How to fix provider registry registry.terraform.io does not have a provider named in Terraform

TerraformINTERMEDIATEHIGHUpdated Dec 30, 2025· 160 views

This error occurs when Terraform cannot find a provider in the Terraform Registry. Common causes include incorrect provider source syntax, network connectivity issues, or missing required_providers declarations.

Quick fix

Fixes provider registry registry.terraform.io does not have a provider named

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
}
  1. Verify provider source syntax
  2. Check network connectivity to registry
  3. Clear and reinitialize Terraform
  4. Update state file if migrating providers
terraform — error
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
provider registry registry.terraform.io does not have a provider named

What this error means

This error means Terraform attempted to install a provider from registry.terraform.io but could not locate it. This typically happens during `terraform init` when the provider source is incorrectly specified, the provider doesn't exist at that location, or Terraform cannot reach the registry. The error can be misleading because it may also indicate network issues preventing registry access.

Typical symptoms

  • terraform init fails with 'does not have a provider named' message
  • Terraform cannot download provider plugins
  • Error appears even with valid provider configurations
  • Works on some machines but fails on others (network-related)
  • Fails after upgrading Terraform or changing provider versions

Common causes

  1. Missing or incorrect required_providers block in Terraform configuration
  2. Incorrect provider source address format or typo in provider name
  3. Network connectivity issues preventing access to registry.terraform.io
  4. DNS resolution problems or firewall blocking registry access
  5. Using legacy provider syntax without explicit source declaration (pre-0.13)
  6. Provider state file references outdated or non-existent provider paths
  7. Registry outage or service disruption

How to fix "provider registry registry.terraform.io does not have a provider named"

1Verify provider source syntax

Check your Terraform configuration for the required_providers block. The source must follow the format hostname/namespace/type. For example:

hcl
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
}

Common mistakes:
- Missing source argument (relies on implicit hashicorp namespace)
- Typos in provider name or namespace
- Using only the provider type without namespace

2Check network connectivity to registry

Verify that your machine can reach the Terraform Registry:

bash
ping registry.terraform.io
curl -I https://registry.terraform.io/

If the ping or curl fails:
- Check your internet connection
- Verify firewall rules aren't blocking registry.terraform.io
- If using a VPN or proxy, ensure it's properly configured
- Try switching to a public DNS server (e.g., 8.8.8.8) if using corporate DNS

3Clear and reinitialize Terraform

Remove cached provider data and reinitialize:

bash
rm -rf .terraform .terraform.lock.hcl
terraform init

This forces Terraform to re-download all providers from scratch and can resolve stale cache issues.

4Update state file if migrating providers

If you're migrating from an old provider path (common when upgrading from Terraform 0.12), update the state file:

bash
terraform state replace-provider registry.terraform.io/-/aws registry.terraform.io/hashicorp/aws

Replace the old and new provider addresses as appropriate for your situation.

5Use registry mirror for offline/restricted environments

If your environment cannot access the public registry, configure a local mirror. Create or edit ~/.terraformrc (Linux/Mac) or %APPDATA%/terraform.rc (Windows):

hcl
provider_installation {
  filesystem_mirror {
    path    = "/usr/share/terraform/providers"
    include = ["registry.terraform.io/*/*"]
  }
  direct {
    exclude = ["registry.terraform.io/*/*"]
  }
}

Then place provider binaries in the specified directory following the structure: hostname/namespace/type/version/os_arch/

Advanced notes

For Terraform versions 0.13.0 to 1.0.0, there was a DNS resolution issue on macOS/Linux related to Go's DNS client that could cause phantom provider-not-found errors even when providers exist. This was fixed in Terraform 1.0.1 and later. If you're on an older version, upgrading is recommended.

Organizations using private Terraform registries or air-gapped environments should implement a local provider mirror or run an internal registry implementing the provider registry protocol. This eliminates dependency on the public registry for provider discovery and installation.

Frequently asked questions

What does "provider registry registry.terraform.io does not have a provider named" mean?
io but could not locate it. This typically happens during terraform init when the provider source is incorrectly specified, the provider doesn't exist at that location, or Terraform cannot reach the registry. The error can be misleading because it may also indicate network issues preventing registry access.
How do I fix "provider registry registry.terraform.io does not have a provider named"?
This error occurs when Terraform cannot find a provider in the Terraform Registry. Common causes include incorrect provider source syntax, network connectivity issues, or missing required_providers declarations.
What causes "provider registry registry.terraform.io does not have a provider named"?
Missing or incorrect required_providers block in Terraform configuration Incorrect provider source address format or typo in provider name Network connectivity issues preventing access to registry.terraform.io
Is the "provider registry registry.terraform.io does not have a provider named" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading