Introduction
When a Terraform Cloud workspace is connected to a VCS repository the repository contents are cloned each time a commit is pushed to the branch tracked by the workspace.
If the cloning process fails Terraform Cloud will display an error in the workspace and will not allow runs to be triggered in it as the associated Terraform configuration is out of sync with the VCS repository contents.
Problem
A workspace is displaying the error message "Error: failed to retrieve configuration".
Error
Error: failed to retrieve configuration
Retrieving the configuration version failed with the error:
Timed out while fetching the configuration version.
.The following steps may help resolve the issue:
- Check your version control provider for downtime or connectivity issues.
- Check your version control provider settings or workspace settings to make sure the connection details are accurate.
- Push a change to your repository to trigger a new run.
Solutions
Reading the detailed error message can help narrow down the possible causes.
Please perform the steps below:
- Check your version control provider for downtime or connectivity issues.
- Check your version control provider settings or workspace settings to make sure the connection details are accurate.
- Push a change/create new commit to your repository to trigger a new run.
Outcome
When Terraform Cloud succeeds in cloning the VCS repository the error message in the workspace will disappear and it will be possible to trigger runs.