-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform and Azure API locations inconsistency #7906
Comments
By way of update. This is blocked until we get a resolution from MSFT on the locations API returning incorrect values for the India locations. Once we get reliable data back, we'll be able to merge @favoretti 's PR to correct the tests. |
This is kind of absolutely weird, to change a crucial API without any backward compatibility. I guess MSFT has their own reasons. |
@tombuildsstuff is there any alternate approach to do this? Sorry to pester, but it's kind of a priority :( |
The only way i got around this for making changes to our Production infrastructure was to go back to version 2.19.0 of the Azure Provider. Sadly that won't work if you need features added since 2.20.0 forwards, but for us was the only way to push required changes out. |
@andydkelly-ig @rjshrjndrn as @jackofallops has mentioned unfortunately this incorrect data is coming from the Azure API - Terraform is now using this data to validate regions (to be able to offer enhanced validation at 'plan' time rather than crashing during an 'apply'). Until this is fixed on the Azure-side (which we've raised with Microsoft) you can opt-out of this by setting the environment variable |
@AndreasAbdi @tombuildsstuff thanks for your response. |
This has been released in version 2.25.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.25.0"
}
# ... other configuration ... |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
Terraform Configuration Files
For example RG resource, but everything else fails. RG is only the prerequisite
Debug Output
Panic Output
Expected Behavior
Terraform should create resources in desired location/region
Actual Behavior
Terraform does not support the
south
/west
/central
India locations. They are called Indiasouth
/west
/central
in terraform which is not valid on Azure sitehttps://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/internal/location/validation_test.go#L167
If we set location/region name to Terraform format (validation above), we got an error originating from Azure
Which is reasonable and expected since
But trying to use the valid location/region on Azure fails in Terraform validation
Steps to Reproduce
terraform apply
Important Factoids
References
Additional info
The most interesting thing is that
centralindia
is valid even when I set it in terraform and create the resource (cannot found it in the validation test?) but southindia/westindia are not ❓ How come the locations are not the same API <-> provider?Location differences. Terraform on the left, Azure on the right
The text was updated successfully, but these errors were encountered: