-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Fix diffTags to actually create a diff instead of unnecessarily recre… #6370
Conversation
…ating existing tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this, @fbreckle! Could you adding a covering unit test in TestDiffTags
?
https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/tags_test.go#L14
done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much, @fbreckle! In doing my pre-merge sweep of existing PRs I caught #5108 which is also doing a similar update as this PR. To be fair to both your contributions, I'm pulling in the #5108 code and this PR's additional testing. LGTM after acceptance testing this against a few of our EC2 resource tests. 🚀
This has been released in version 1.43.1 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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. Thanks! |
…ating existing tags.
Solves Issue #6363
Changes proposed in this pull request:
Modify diffTags to behave as explained in its comment:
// diffTags takes our tags locally and the ones remotely and returns
// the set of tags that must be created, and the set of tags that must
// be destroyed.
Many similar functions exist for other aws elements, which all seem to have the same erroneous behavior and can be fixed analogously.