-
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
Case sensitive bug with "azurerm_cdn_frontdoor_*" ("resourceGroups" vs "resourcegroups") #24136
Comments
Hi @joakimlemb, this is currently by design(see @tombuildsstuff's comment on PR #22289) and as such I will be closing this issue as by design. However, I will leave this issue open until Friday (12/15/2023) incase there was something I did not understand in the repro case. |
@joakimlemb whilst what @WodansSon has mentioned is correct (this is expected/by design) - it's worth noting that this diff is coming from the As such, you should be able to workaround this issue by removing this resource from your Terraform State and re-importing it using the Resource ID format defined in the
In the future when the Thanks! |
@tombuildsstuff From the resource browser at https://resources.azure.com/ Is it a good idea to care about case sensitivity for this when the azure docs states the opposite? |
We don't parse that value from the Azure API response - since this resource is nested under the CDN Profile, it's defined within the Provider (else it'd 404 when we retrieve it). Where values are parsed from the Azure API response (e.g. the Network Interface ID for a Virtual Machine) should the Resource ID be returned miscased (as in your screenshot above) we'd parse the Resource ID case-insensitively and re-case the key components as required - handling
Having chatted extensively with the ARM Team about this unfortunately that document is outdated (there's been multiple differing sets of guidance over the years) - however Azure API's are supposed to be case insensitive in Requests for both URIs and Enums - and case-insensitive in Responses - however different APIs implement this behaviour differently (due to said differing sets of guidance). To workaround these upstream inconsistencies, we're moving towards having the Provider define the Resource ID for a given Resource (typically using the Azure Resource ID for a given Resource, but following the
Glad to hear this is now working for you, since this has been resolved I'm going to close this issue for the moment 👍 |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.4.2
AzureRM Provider Version
3.83.0
Affected Resource(s)/Data Source(s)
azurerm_cdn_frontdoor_origin_group
azurerm_cdn_frontdoor_origin
azurerm_cdn_frontdoor_route
azurerm_cdn_frontdoor_custom_domain
azurerm_cdn_frontdoor_custom_domain_association
azurerm_cdn_frontdoor_endpoint
azurerm_cdn_frontdoor_* (assuming this is affecting all azurerm_cdn_frontdoor_* resource types)
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Nothing.
Actual Behaviour
Steps to Reproduce
terraform plan
Important Factoids
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules
References
Similar bugs:
#24138
#23990
#17090
#24123
#24109
The text was updated successfully, but these errors were encountered: