-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Tech debt: Consistently handle overlapping resource tags when updating #7052
Comments
This brings up the bigger issue of making tag handling functions generic via Go reflection. |
I really don't want to start any sort of flame war on the subject, but I think a few of the maintainers are strongly opposed to reflection. 😅 Type assertion (via creating our own generic type, call it something like |
I wasn't expressing any preference or opinion 😄. |
|
Note that some of these diffTags functions may not be needed as the underlying AWS API doesn't deal with tag set differences but instead just deletes all tags and applies a tag set. e.g. for S3: https://github.com/terraform-providers/terraform-provider-aws/blob/9a2ba295b2f1ccbb54fc2c62a31312962f362da1/aws/s3_tags.go#L25-L28 and https://github.com/terraform-providers/terraform-provider-aws/blob/9a2ba295b2f1ccbb54fc2c62a31312962f362da1/aws/s3_tags.go#L36-L45. |
I will close this issue when #10018 is merged as the functionality that PR implements will fix this for all existing services and new services in the future. |
I'm closing this issue in favor of #10688, implementation of which will ensure overlapping tags are handled correctly. |
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! |
Community Note
Prompted by #6911 (comment) which references #5108.
Ensure that we are consistently handling overlapping resource tags when updating a resource.
Because each AWS service has its own types and methods for resource tagging, code has been copy-pasted and is now inconsistent.
The text was updated successfully, but these errors were encountered: