Introduction
Problem:
A user may encounter the following error during a terraform plan or apply:
Initializing provider plugins...
- Reusing previous version of hashicorp/google from the dependency lock file
- Reusing previous version of hashicorp/kubernetes from the dependency lock file
- Reusing previous version of hashicorp/aws from the dependency lock file
- Reusing previous version of hashicorp/azurerm from the dependency lock file
- Reusing previous version of hashicorp/null from the dependency lock file
- Installing hashicorp/google v4.63.1...
- Installed hashicorp/google v4.63.1 (signed by HashiCorp)
- Installing hashicorp/kubernetes v2.20.0...
- Installed hashicorp/kubernetes v2.20.0 (signed by HashiCorp)
- Installing hashicorp/aws v4.65.0...
- Installed hashicorp/aws v4.65.0 (signed by HashiCorp)
- Installing hashicorp/azurerm v3.54.0...
- Installed hashicorp/azurerm v3.54.0 (signed by HashiCorp)
- Installing hashicorp/null v3.2.1...
Operation failed: failed running terraform init (exit -1)
Cause:
The run is erroring because it hit the 10-minute timeout for initializing provider plugins. This is caused by slow network connectivity in the run container.
Solutions
Troubleshooting:
1. Use the Terraform Cloud/Enterprise Run API to validate status-timestamps
.
OR
2. Enable TRACE
logging and re-run the run to validate timestamps.
Solutions:
1. Increase network capacity for the agent.
2. Reduce the number of provider/modules to be downloaded.