-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
AKS OMS LAW ID repetitively updated due to unnecessary case sensibility #17682
Comments
Taking a look through here it appears that the value being provided to Terraform isn't provided in the casing we're expecting here - whilst at this point in time this particular field doesn't validate the casing of the particular segments for the Log Analytics Workspace ID that's being provided, this functionality will be added in a future release and as such in the interim you'll need to ensure the value being provided in The casing used in the Azure Portal can differ from what's returned from the Azure API - and unfortunately we've found that a number of the Azure APIs can subtly (and silently) break when the incorrect casing is provided, as such we end up having to treat Resource IDs as case-sensitive. As mentioned above we'll be bringing case-specific validation to this field in the future - however for now the casing we're expecting can be found in the documentation for the Thanks! |
Thanks @tombuildsstuff! Now I understand why azurerm treats Resource ID as case sensitive due to other issues of Azure APIs, and your planned fix of applying case-specific validation in the future makes sense. Also FYI, for Log Analytics Workspace Resource ID, I did verify both both Azure Portal and az cli returns all lower case and believe ARM API should return the same. We are using one of the workaround options including the one your mentioned, but they require extra steps and can cause future confusion. So please let me know how I we can be notified when this fix is available. Thanks again! |
@tombuildsstuff unfortunately, even if we provide the LAW Resource ID in the correct casing (all lowercase), the provider always wants to reapply. Seems like Azure transforms the string after the apply. Edit: seems like the string gets transformed by |
Provider reapply in all lowercase if OK. The issue is Terraform Plan repetitively capture this unnecessary change so the fix mentioned by @tombuildsstuff totally makes sense for azurerm ignore casing in comparison and validation for LAW Resource ID. |
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.0.8
AzureRM Provider Version
3.1.0
Affected Resource(s)/Data Source(s)
azurerm_kubernetes_cluster.k8s[0]
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Terraform+Azurerm should NOT plan/apply the change of LAW ID repetitively just due to case sensitivity
Actual Behaviour
Terraform+Azurerm plan/apply change of LAW ID repetitively just due to case sensitivity, even though actual LAW ID is the SAME. It seems what the actual env. value retrieved by Terraform/Azurerm has DIFFERENT CASE from what's configured in Terraform config whose value comes from Azure portal which is all lower case
Steps to Reproduce
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: