hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.52k stars 4.6k forks source link

Error: "jioindiawest" was not found in the list of supported Azure Locations #16260

Closed motokotoboom closed 2 years ago

motokotoboom commented 2 years ago

Is there an existing issue for this?

Community Note

Terraform Version

v1.1.7

AzureRM Provider Version

3.0.2

Affected Resource(s)/Data Source(s)

azurerm_public_ip, azurerm_storage_account, azurerm_network_interface

Terraform Configuration Files

resource "azurerm_public_ip" "outbound_ip_address" {
  name                = "outbound_ip_address"
  resource_group_name = "your-rg"
  location            = "jioindiawest"
  allocation_method   = "Static"
  domain_name_label = "jioindiawestip"
  sku = "Standard"
}

Debug Output/Panic Output

│ Error: "jioindiawest" was not found in the list of supported Azure Locations: "westus,westus2,eastus,centralus,centraluseuap,southcentralus,northcentralus,westcentralus,eastus2,eastus2euap,brazilsouth,brazilus,northeurope,westeurope,eastasia,southeastasia,japanwest,japaneast,koreacentral,koreasouth,southindia,westindia,centralindia,australiaeast,australiasoutheast,canadacentral,canadaeast,uksouth,ukwest,francecentral,francesouth,australiacentral,australiacentral2,uaecentral,uaenorth,southafricanorth,southafricawest,switzerlandnorth,switzerlandwest,germanynorth,germanywestcentral,norwayeast,norwaywest,brazilsoutheast,westus3,swedencentral,swedensouth"

#while az cli with the same sp shows:
az account list-locations -o table | grep jio
Jio India West            jioindiawest         (Asia Pacific) Jio India West
Jio India Central         jioindiacentral      (Asia Pacific) Jio India Central

Expected Behaviour

azurerm_public_ip should be created

Actual Behaviour

resources: azurerm_public_ip azurerm_storage_account azurerm_network_interface are not created with jioindiawest location with the same error

Steps to Reproduce

No response

Important Factoids

No response

References

No response

sebader commented 2 years ago

Have you successfully created the PIP with CLI (outside of terraform)? If this also does not work, this is not a TF bug

motokotoboom commented 2 years ago

yes, I have. az network public-ip list -o table Name ResourceGroup Location Zones Address AddressVersion AllocationMethod IdleTimeoutInMinutes ProvisioningState


outbound_ip_address xxxxxxx jioindiawest xxxxxxxx IPv4 Static 4 Succeeded

tombuildsstuff commented 2 years ago

👋

Taking a look through here this appears to be an issue in the Azure API where this information isn't being returned in the MetaData Endpoint: https://management.azure.com/metadata/endpoints?api-version=2018-01-01 - as such we'd need this information returned for it to be usable in Terraform.

In this instance I'd recommend reaching out to Azure Support about this, as this MetaData endpoint should be being populated for all new regions, but in the interim you should be able to workaround this by disabling Enhanced Validation by setting the Environment Variable ARM_PROVIDER_ENHANCED_VALIDATION to false.

Thanks!

motokotoboom commented 2 years ago

@tombuildsstuff Why don't use more fresh api? I'm not sure that azure will want to change api-version=2018-01-01 :)

tombuildsstuff commented 2 years ago

@motokotoboom unfortunately there isn't a newer API version returning that information, there's a number of different API versions for the metadata endpoint which return totally different schemas/information, rather than being additive.

spawn08 commented 2 years ago

Any update on the above issue??

tombuildsstuff commented 2 years ago

jioindiawest is now returned from the endpoint, so this'll be fixed automatically: https://management.azure.com/metadata/endpoints?api-version=2018-01-01

github-actions[bot] commented 2 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.