Skip to content
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

r/application_gateway: ensuring the casing on identity_ids within the identity block #10031

Merged
merged 5 commits into from Jan 11, 2021

Conversation

JohnDelisle
Copy link
Contributor

Fixes issue with identity_ids being case-sensitive, which results in terraform forcing an update on each apply due to case differences in e.g. .../resourceGroups/... vs. .../resourcegroups/.... See issue #10029

Tested by building azurerm provider 2.4.0 locally.

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
@ghost ghost added the size/XS label Jan 1, 2021
@favoretti
Copy link
Collaborator

Convert it to generator instead maybe?

katbyte
katbyte previously requested changes Jan 5, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to second what @favoretti said, instead of making this property case insensitive we should use the new Parse functions when reading them in from azure to store them in the correct case.

@JohnDelisle
Copy link
Contributor Author

JohnDelisle commented Jan 5, 2021

I'm going to second what @favoretti said, instead of making this property case insensitive we should use the new Parse functions when reading them in from azure to store them in the correct case.

Thanks for the feedback!

Is there an App Gw property that's currently implemented this way? I'm new to this and could use an example/ template of how it's done.

Also, does this approach still achieve the objective of accepting a case-insensitive value for identity_ids? What I'm getting at is that identity_ids could be getting pulled programatically (e.g. as a data source or as a resource elsewhere in the module, where the case would likely be "as expected"), or they could be added by humans who expect them to be case-insensitive.

@ghost ghost removed the waiting-response label Jan 5, 2021
@katbyte
Copy link
Collaborator

katbyte commented Jan 7, 2021

@JohnDelisle - it will treat parts of the resource id as case insensitive (the non user specified bits like resourceGroup), you can see how to generate the parse functions in the resourceid.go files in many of the services now (not sure if they exist for ap gateware, i'm on mobile right now)

@JohnDelisle
Copy link
Contributor Author

JohnDelisle commented Jan 9, 2021

@katbyte I've followed @sharebear's lead in #10105 and used azurerm/internal/services/msi/parse. Tested working with /ResourceGroup/ and /resourceGroup/.

Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for this @JohnDelisle

@tombuildsstuff tombuildsstuff dismissed katbyte’s stale review January 11, 2021 08:05

dismissing since changes have been pushed

@tombuildsstuff tombuildsstuff changed the title Make AppGw identity_ids case-insensitive r/application_gateway: ensuring the casing on identity_ids within the identity block Jan 11, 2021
@tombuildsstuff
Copy link
Member

Tests look good 👍

@ghost
Copy link

ghost commented Jan 14, 2021

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 ...

@JohnDelisle JohnDelisle deleted the patch-1 branch January 18, 2021 22:23
@ghost
Copy link

ghost commented Feb 10, 2021

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Feb 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants