Problem
Runs triggered through the CLI, API, or UI 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
These errors indicate a problem with the configuration version upload process in Terraform Enterprise.
Cause of "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 code archive to object storage.
To prevent this error from occurring on new configuration versions, review the slug-ingress and archivist logs for relevant errors. These are the Terraform Enterprise services involved in the ingress process.
Cause of "Configuration version is still being processed."
This error indicates that the Terraform code has not been successfully uploaded to the Terraform Enterprise platform, leaving the workspace's current configuration version stuck in a pending status. It is most likely to occur in an API-driven or CLI-driven run.
- API-driven runs: The error suggests that the configuration files have not been uploaded, which is a required step in that workflow, or that the upload failed from the client-side.
- CLI-driven runs: Network-related issues may be preventing the Terraform CLI from successfully uploading the source code to the Terraform Enterprise platform after creating the configuration version.
Solutions
After you investigate and resolve the underlying cause, you must create a new configuration version to supersede the pending or errored one. The method for creating a new configuration version depends on the workspace's execution mode.
Solution 1: For VCS-driven Workspaces
Push a no-operation (no-op) commit to the VCS repository. This triggers Terraform Enterprise to create a new configuration version and re-attempt to ingress the code. A run will start automatically once the configuration version has been successfully uploaded. For more details, refer to the documentation on automatically starting runs.
Solution 2: For CLI-driven Workspaces
Trigger a new plan and apply run using the Terraform CLI. This action will create and upload a new configuration version.
Solution 3: For API-driven Workspaces
Create a new configuration version using the API by following the steps in the Pushing a New Configuration Version documentation.
Outcome
After following the appropriate steps, the workspace's current configuration version is in an uploaded state, and you can successfully trigger new runs in the workspace.