# Error: Failed to query available provider packages: could not retrieve the list of available versions for provider hashicorp/aws: request timed out after 30 seconds

- **ID:** `terraform/terraform-provider-registry-timeout`
- **Domain:** terraform
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Network connectivity issue or registry server timeout prevents Terraform from fetching provider versions from the registry.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.5 | active | — | — |
| Terraform v1.6 | active | — | — |
| Terraform v1.7 | active | — | — |
| Terraform v1.8 | active | — | — |

## Workarounds

1. **Set the environment variable 'TF_REGISTRY_CLIENT_TIMEOUT' to a higher value, e.g., 60 seconds, and rerun 'terraform init'.** (70% success)
   ```
   Set the environment variable 'TF_REGISTRY_CLIENT_TIMEOUT' to a higher value, e.g., 60 seconds, and rerun 'terraform init'.
   ```
2. **Use a local provider mirror by configuring 'provider_installation' in .terraformrc to use a filesystem mirror or network mirror.** (90% success)
   ```
   Use a local provider mirror by configuring 'provider_installation' in .terraformrc to use a filesystem mirror or network mirror.
   ```

## Dead Ends

- **** — Debug logging does not resolve network timeouts; it only adds verbosity without addressing the root cause. (90% fail)
- **** — Without a local mirror, Terraform cannot find any providers, leading to a different error about missing providers. (80% fail)
- **** — Provider blocks do not have a timeout attribute for registry queries; this is a client-side setting. (95% fail)
