title: Failed to query available provider packages
body: <p>I'm using the Powershell in the Azure Portal.
  Terraform version =  v1.0.3
  Powershell version = 7.1.3</p>
  <p>this is my code</p>
  <pre><code>provider &quot;azurerm&quot; {  
    features {}  
  }  
  resource &quot;azure_storage_account&quot; &quot;lab&quot; {  
      name                        = &quot;newbloddystoragegroup&quot;  
      resource_group_name         = &quot;TFResourcegroup&quot;  
      location                    = &quot;eastus&quot;  
      account_tier                = &quot;Standard&quot;  
      account_replication_type    = &quot;LRS&quot;  
  }  
  resource &quot;azure_storage_container&quot; &quot;lab&quot; {  
      name                        = &quot;blobcontainer4dev&quot;  
      storage_account_name        = azure.storage.account.lab.name  
      container_access_type       = &quot;private&quot;  
  }  
  resource &quot;azure_storage_blob&quot; &quot;lab&quot; {  
      name                        = &quot;TerraformdevBlob&quot;  
      storage_account_name        = azure_storage_account.lab.name  
      storage_container_name      = azure_storage_container.lab.name  
      account_replication_type    = &quot;Block&quot;  
  }  
  resource &quot;azure_storage_share&quot; &quot;lab&quot;{  
      name                        = &quot;terraformdevshare&quot;  
      storage_account_name        = azure_storage_account.lab.name  
      quota                       = 50  
  }
  </code></pre>
  <p>but when I run terraform init..I get the following error</p>
  <pre><code>Initializing provider plugins...
  - Finding latest version of hashicorp/azurerm...
  - Finding latest version of hashicorp/azure...
  - Installing hashicorp/azurerm v2.74.0...
  - Installed hashicorp/azurerm v2.74.0 (signed by HashiCorp)
  ╷
  │ Error: Failed to query available provider packages
  │
  │ Could not retrieve the list of available versions for provider hashicorp/azure: provider registry registry.terraform.io does not have a provider named registry.terraform.io/hashicorp/azure
  │
  │ Did you intend to use terraform-providers/azure? If so, you must specify that source address in each module which requires that provider. To see which modules are currently depending on hashicorp/azure, run the following command:
  │     terraform providers
  </code></pre>
  <p>I've run this..</p>
  <pre><code>terraform providers
  
  Providers required by configuration:
  .
  ├── provider[registry.terraform.io/hashicorp/azure]
  └── provider[registry.terraform.io/hashicorp/azurerm]
  </code></pre>
  <p>but I don't know what I have to change</p>
  <p>What I've tried ...</p>
  <ol>
  <li>I've put</li>
  </ol>
  <pre><code>provider &quot;azurerm&quot; {  
    features {}  
  }  
  </code></pre>
  <p>into its own provider.tf file...but I'm still getting the error</p>
  <ol start="2">
  <li>I've tried to put</li>
  </ol>
  <pre><code>provider &quot;registry.terraform.io/hashicorp/azurerm&quot; {  
    features {}  
  }  
  </code></pre>
  <p>...but it turns out that that is unacceptable syntax</p>
  <ol start="3">
  <li>I've tried replacing</li>
  </ol>
  <pre><code>provider &quot;azurerm&quot; {  
    features {}  
  }  
  </code></pre>
  <p>with</p>
  <pre><code>required_providers {
      azurerm = {
        source = &quot;hashicorp/azurerm&quot;
        version = &quot;2.74.0&quot;
      }
  </code></pre>
  <p>..but that didn't work either</p>
  <p>..any help is gratefully received....just guide me ..you don't necessarily  need to tell me the answer</p>