Provider registry registry.terraform.io does not have a provider named registry.terraform.io/hashicorp/aks

Here Terraform require-provider block

I keep getting the following error when I try to initialize

terraform {
required_providers {
azurerm = {
source = “hashicorp/azurerm”
version = “>= 3.0.0, < 4.0.0”
#version = “>= 2.0, < 3.0”
}
azuread = {
source = “hashicorp/azuread”
version = “2.47.0”
}
}
}

Configure the Microsoft Azure Provider for Azure Authentication

provider “azurerm” {
skip_provider_registration = true
features {}

subscription_id = var.subscription_id
client_id = var.client_id
client_secret = var.client_secret
tenant_id = var.tenant_id
}

provider “azurerm” {
subscription_id = “var.subscription_id2”
features {}
alias = “subscription2”
}

Below is the getting response.


PS C:\Users\ram\Documents\Terraform\projectone\Infra16-jumpbox2> terraform init

Initializing the backend…

Initializing provider plugins…

  • Finding latest version of hashicorp/kubernetes…
  • Finding latest version of hashicorp/local…
  • Finding latest version of hashicorp/aks…
  • Finding hashicorp/azurerm versions matching “>= 3.0.0, < 4.0.0”…
  • Finding hashicorp/azuread versions matching “2.47.0”…
  • Installing hashicorp/kubernetes v2.25.2…
  • Installed hashicorp/kubernetes v2.25.2 (signed by HashiCorp)
  • Installing hashicorp/local v2.4.1…
  • Installed hashicorp/local v2.4.1 (signed by HashiCorp)
  • Installing hashicorp/azurerm v3.86.0…
  • Installed hashicorp/azurerm v3.86.0 (signed by HashiCorp)
  • Installing hashicorp/azuread v2.47.0…
  • Installed hashicorp/azuread v2.47.0 (signed by HashiCorp)

    │ Error: Failed to query available provider packages

    │ Could not retrieve the list of available versions for provider hashicorp/aks: provider registry registry.terraform.io does not have a
    │ provider named Terraform Registry

    │ 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/aks, run the following command:
    │ terraform providers

PS C:\Users\ram\Documents\Terraform\projectone\Infra16-jumpbox2> terraform providers

Providers required by configuration:
.
├── provider[Terraform Registry] >= 3.0.0, < 4.0.0
├── provider[Terraform Registry]
├── provider[Terraform Registry]
├── provider[Terraform Registry]
└── provider[Terraform Registry] 2.47.0