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.0 when only 5.0 exists).
  • 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_providers block.
  • $Check if m1-terraform-provider-helper is needed (legacy).

Resolution

1
Update the version constraint.
2
Run terraform init -upgrade.

Metadata

Tool
Terraform
Severity
High
Tags
#terraform#iac#provider