Terraformexit code > 0
Failed to query available provider packages
$Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given constraints
Analysis
Terraform cannot find a provider version that matches the constraints in your
versions.tf or required_providers block.Common Triggers
- ●Typo in version constraint (e.g.,
~> 4.0when only5.0exists). - ●Network issues reaching the Terraform Registry.
- ●Using a provider that doesn't support your architecture (e.g., Apple Silicon M1/M2).
Debug Checks
- $Check
required_providersblock. - $Check if
m1-terraform-provider-helperis needed (legacy).
Resolution
1
Update the version constraint.
2
Run
terraform init -upgrade.Metadata
- Tool
- Terraform
- Severity
- High
- Tags
- #terraform#iac#provider