title: Terraform azure Incompatible provider version
body: <p>When i'm trying to initialize terraform, i'm getting following error only with vnet module,
  But terraform initilization working with  azure_resource_group, azure_virtual_machine modules</p>
  <p>Terraform 0.13 and earlier allowed provider version constraints inside the
  provider configuration block, but that is now deprecated and will be removed
  in a future version of Terraform. To silence this warning, move the provider
  version constraint into the required_providers block.</p>
  <p>Error: Failed to query available provider packages</p>
  <p>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</p>
  <p>If you have just upgraded directly from Terraform v0.12 to Terraform v0.14
  then please upgrade to Terraform v0.13 first and follow the upgrade guide for
  that release, which might help you address this problem.</p>
  <p>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,</p>
  <p><a href="https://i.stack.imgur.com/krXcV.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p><a href="https://i.stack.imgur.com/FfMjj.png" rel="nofollow noreferrer">enter image description here</a></p>
  <pre><code>main.tf
  
  resource &quot;azurerm_virtual_network&quot; &quot;vnet&quot; {
    for_each = { for n in var.networks : n.name =&gt; n }
    name                = each.value.name
    address_space       = each.value.address_space
    location            = each.value.location
    resource_group_name = each.value.rg_name
  
    dynamic &quot;subnet&quot; {
      for_each = each.value.subnets
      content {
        name           = subnet.value.name
        address_prefix = subnet.value.address_prefixes
      }
    }
  }
  
  variables.tf
  variable networks {
      type = list(object({
          name           = string
          address_space  = list(string)
          rg_name        = string
          location       = string
          subnets        = list(object({
                  name             = string
                  address_prefixes = string
              }))    
    }))
  }
  
  module (main.tf)
  module &quot;azurevnet&quot;{
      source                  = &quot;./vnet&quot;
      networks                = var.networks
  }
  
  provider.tf
  
  provider &quot;azurerm&quot; {
    version = &quot;=2.37.0&quot;
  }
  </code></pre>