-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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_application_gateway identity_ids are case-sensitive, and shouldn't be #10029
Comments
I believe this should address the issue of identity_ids being case-sensitive, resulting in terraform forcing an update on each apply due to case differences. See issue hashicorp#10029
I'm seeing identical behaviour applying to a function app. The only difference is in the case of "resourceGroups" in the ID path. I have tried providers 2.41.0, 2.30.0, 2.29.0, 2.20.0. It is only happening for a function app that was created on 21st December, all my other function apps are fine (no changes in plan) ~ identity { Checking my terraform state it appears to be the output of resource azuread_identities_application that has changed behaviour, it is now outputting id with case "resourceGroups" rather than my previously created identities that are all lower case "resourcegroups" |
@dhmoto17 I'd suggest opening a new issue specific to that resource. Or, perhaps an over-arching issue asking for this to be fixed globally anywhere resource IDs are used. |
We just tripped over this on function apps as well, @tombuildsstuff was doing a lot of work around this before the new year (might still be, I've not checked the git log recently), and he fixed a similar issue quickly for me... maybe he can weigh in on whether this should be separate issues or just one global for all places user assigned identities are used. |
If I've understood the Id parsing framework correctly the fix is to make use of the |
Fixed via #10031 @sharebear looks like those are tracked in #10105 - so it's probably easiest just to track them there rather than a separate issue for now |
This has been released in version 2.43.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.43.0"
}
# ... other configuration ... |
I updated to version 2.43.0. Now I have the following result in my terraform plan of the application gateway: ~ identity { I tries to switch from resourceGroups to resourcegroups on my application gateway. |
@danielweberoffice looks like we missed a state migration for this, apologies - but the fix for that is in #10196 |
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)
azurerm_application_gateway
Terraform Configuration Files
NA - see output, it's an obvious issue
Debug Output
Observe the difference in case of "resourcegroups" vs. "resourceGroups" below in the identity_ids.
Panic Output
Expected Behaviour
The property is identical other than case, so resource does not need to be updated and should not be identified by
terraform plan
for an update.Actual Behaviour
Terraform wants to update the resource
Steps to Reproduce
Important Factoids
This occurs every run, even after applying.. I run terraform apply again, and EVERY TIME it thinks it needs to update the App Gateway resource because the case differs. In case it's relevant, the identity ID is a property of a managed identity that's also created in the same Terraform, using a
azurerm_user_assigned_identity
resource type.References
https://github.com/terraform-providers/terraform-provider-azurerm/blob/54c226cbac5fa28b6dfb08156114c71df33d04ae/azurerm/internal/services/network/application_gateway_resource.go#L87-L96
The text was updated successfully, but these errors were encountered: