-
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
azurerm_dns_zone Import is Case Sensitive #28254
Comments
Hi @andrewpleasants-bjss-nhs, Terraform is case-sensitive by design (unlike the HTTP API), so we must always provide a correctly cased ID to the terraform import command. This is expected behavior. Out of curiosity, was the lowercase ID copied from the Azure portal or somewhere else? |
Hi @wuxu92 yes I copied the resource ID from the Azure Portal, it's also lowercase using tooling such as AZ CLI. So if Terraform is case sensitive (which is a reasonable design decision), it should be changed from |
Looking into the source code I can see that in the DNS Zone data source file, ParseDNSZoneIDInsensitively (see here) but in the resource ParseDNSZoneID is used so there's a slight inconsistency there. Again, I'm not sure if this is a deliberate design decision in the provider / Terraform (which is fine of course) |
@andrewpleasants-bjss-nhs Terraform always respects the case of the API definition in Swagger, found at https://github.com/Azure/azure-rest-api-specs/blob/67c84bd51ccfca841c39f274b9147347abed3f66/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/dns.json#L767. Therefore, I believe this is a Portal display issue rather than a provider issue. The insensitive parse function is used internally to address the API response case issue and is not designed for use in the
|
Is there an existing issue for this?
Community Note
Terraform Version
1.9.5
AzureRM Provider Version
4.8.0
Affected Resource(s)/Data Source(s)
azurerm_dns_zone
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The lowercase z shouldn't impact the import process
Actual Behaviour
Had to change the z to an upper case Z to get the import to work
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: