-
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
Add ability to ignore tags not set via the various azurerm resource blocks #7034
Comments
Perhaps it could work like this similar change that was implemented recently for the AWS provider? As it stands, thanks to my organisation's decision to add several tags at the subscription level, every one of my Terraform resources has a lengthy list of fake values for tags, plus an equivalent list in the |
A simular use case that would be good to support is the possibility to:
So the provider should ignore changes to the tag changedbyui. |
This comment has been minimized.
This comment has been minimized.
This is will eventually be a blocker for my organization, so I may be able to spend some time implementing this. I think we'll be better off mimicking the existing functionality and syntax from the AWS provider, as pointed out by @markslater , rather than trying something new. The AWS folks have already battle tested the pattern, so that's the route I'll take, unless we have some strong objections. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hey @dpbustos Thanks for opening this issue. Taking a look through here whilst there's a couple of approaches suggested above, were we to add support for this we'd likely do this closer to the AWS model of using "default tags" on the provider block than ignoring prefixes (or all tags entirely). Support for that is being tracked in #11682 - as such whilst this issue has more 👍, since #11682 is a more focused feature request I'm going to close this issue in favour of #11682, would you mind subscribing to that issue for updates? It's worth noting that whilst tags in are generally more consistent in Azure than in AWS, there's a similar number of "got-ya's" - insofar as resources which have different constraints on their tags (for example some resources can only have 15 character keys, some API's don't track changes to values if the casing doesn't change whilst others do, some only allow lower-case/certain characters) - so whilst this is technically possible this still requires investigation to confirm that's the best approach here. As mentioned above whilst I'd like to thank you for opening this issue, I'm going to close this issue in favour of #11682 - so please subscribe to that issue for updates. Thanks! |
Ok thanks @tombuildsstuff , I'll track that issue and thanks for letting me know |
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. |
Community Note
Description
Add ability to ignore tags not set via the various
azurerm
resource blocks.At the least, add the ability to be able to specify tag key's which ARE under management and to ignore changes on any other tag key that may be encountered. (This would be the opposite of the
ignore_tags
block functionality for the AWS provider, by having both an ignore and manage option, like a allow/block list, working together might give the most flexibility.)New or Affected Resource(s)
All resources with the
tags
property.Potential Terraform Configuration
Option 1 - Add a boolean flag to each resource to be able to ignore changes to tags not deliberately set by the resource, e.g.:
Option 2 - Add ability to add set of managed tag keys on the provider block (and to ignore changes made on any other keys), e.g.:
References
Related Issues:
The text was updated successfully, but these errors were encountered: