Problem
CLI, API or UI-triggered runs fail with one of the following errors:
Error starting plan
Invalid run parameters: Configuration version was not uploaded correctly.
Error starting plan
Invalid run parameters: Configuration version is still being processed.
Cause
"Configuration version was not uploaded correctly."
This error indicates that Terraform Enterprise failed to process and upload the Terraform code. While transient upload failures can occur, this may be indicative of a more persistent issue. For example, Terraform Enterprise could be failing to clone the contents of your repository due to access issues (VCS only) or it may be experiencing failures persisting the archive of the code to object storage. To prevent this error from manifesting on new configuration versions, review the slug-ingress and archivist logs for relevant errors, as those are the Terraform Enterprise services involved in the ingress process.
"Configuration version is still being processed."
This error indicates that the Terraform code has not been uploaded to the Terraform Enterprise platform, leaving the workspace's current configuration version is stuck in a "pending" status. It is most likely to manifest in an API-driven or CLI-driven run. In the case of API-driven runs, the errors suggests that the configuration files have not been uploaded, a required step in that workflow, or that the upload failed from the client-side. In the case of CLI-driven runs, network-related issues may be preventing Terraform CLI from successfully uploading the source code to the Terraform Enterprise platform after creating the configuration version.
Solutions
Once the possible causes above have been investigated and resolved, use the recovery procedure outlined below to resolve the error.
Create a New Configuration Version
To resolve the error, create a new configuration version to supersede the pending/errored configuration version triggering this error. Utilize one of the following approaches depending on the execution mode of the workspace to create a new configuration version.
VCS
Push a no-op commit to the VCS repository to trigger Terraform Enterprise to create a new configuration version and re-attempt to ingress the code. A run will be started automatically once the configuration version has been successfully uploaded.
CLI
Trigger a new terraform plan-and-apply run via the Terraform CLI.
API
Create a new configuration version via the API following the steps in the Pushing a New Configuration Version documentation.
Outcome
The workspace's current configuration version is in an uploaded state and new runs can be successfully triggered in the workspace.