Failed to query available provider packages

Hi, I am trying to run terraform init and I get the below error.

terraform {

required_providers {

aws = {

  source  = "hashicorp/aws"

  version = "~> 3.51.0"




Configure the AWS Provider

provider “aws” {

region = “eu-west-1”


terraform init

Initializing the backend…

Successfully configured the backend “s3”! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins…

  • Finding hashicorp/aws versions matching “~> 3.50.0”…
  • Finding latest version of hashicorp/nat…
  • Installing hashicorp/aws v3.50.0…
  • Installed hashicorp/aws v3.50.0 (signed by HashiCorp)

    │ Error: Failed to query available provider packages

    │ Could not retrieve the list of available versions for provider hashicorp/nat: provider registry does not have a provider named

    │ All modules should specify their required_providers so that external consumers will get the correct providers when
    │ using a module. To see which modules are currently depending on hashicorp/nat, run the following command:
    │ terraform providers

When I run terraform providers I get the below:

terraform providers

Providers required by configuration:
├── provider[] ~> 3.50.0
└── provider[]

Providers required by state:


Hi @ksekwele,

The output shows your configuration requires a provider called “nat”, but there is no provider, nor do I see a “nat” provider under any namespace.

I’m guessing that you have a typo somewhere in your configuration. I would look for a resource type defined with the prefix "nat_, which would require terraform to look for a provider by this name.

Hi @jbardin

Thanks for that its working fine. It was indeed a typo.

*Rookie error