# Terraform: Error: Failed to install provider — Error while installing hashicorp/aws v5.40.0: could not query provider registry / Get "https://releases.hashicorp.com/...": dial tcp: i/o timeout

**Code:** `Failed to install provider (download failed)` · **Category:** Terraform · **Seen on:** Terraform

Terraform found the provider version but couldn't download/verify the package.

## Meaning

Check network/proxy (`HTTPS_PROXY`), TLS interception (custom CA via `SSL_CERT_FILE`), disk space in `.terraform/`, and checksum/signature problems. Behind firewalls use a mirror (`TF_CLI_CONFIG_FILE` with `provider_installation { network_mirror }` or filesystem mirror) or plugin cache (`TF_PLUGIN_CACHE_DIR`).

## Common causes

- Proxy/firewall blocking releases.hashicorp.com
- TLS inspection without trusted CA
- Disk full/permissions on .terraform
- Corrupted download/checksum mismatch
- Air-gapped environment

## Quick fix

1. Set proxy/CA env vars
2. Use a mirror or `terraform providers mirror` offline
3. Clear `.terraform` and retry `terraform init`

## Detailed fix by platform

### Linux

1. `curl -I https://releases.hashicorp.com && rm -rf .terraform && terraform init`

## How to diagnose

1. **Network** — Reachable?
2. **Proxy/CA** — Set?
3. **Disk** — Space?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/terraform/failed-to-install-provider-network)
