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

Fix aws_appautoscaling_target default tags tf plan pollution #33

Closed
wants to merge 1 commit into from

Conversation

FurqanHabibi
Copy link
Contributor

@FurqanHabibi FurqanHabibi commented Apr 26, 2024

As explained in this issue: hashicorp/terraform-provider-aws#31261,
old aws_appautoscaling_target (created before 2023-03-20) can not have any tags or default tags,
otherwise it will perpetually show up in tf plan.

This implement a workaround by ignoring tags_all that may have been set in the provider default tags.

@FurqanHabibi FurqanHabibi requested a review from hanscg April 26, 2024 01:49
@FurqanHabibi FurqanHabibi self-assigned this Apr 26, 2024
Copy link
Contributor

@hanscg hanscg left a comment

Choose a reason for hiding this comment

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

Does this also ignore tags_all for the newer resource?
The newer resource does support default tags, doesn't it?

@FurqanHabibi
Copy link
Contributor Author

FurqanHabibi commented Apr 26, 2024

Does this also ignore tags_all for the newer resource?
The newer resource does support default tags, doesn't it?

Yes it does.
Although I would think this is still okay for aws_appautoscaling_target since we cannot even interact with them from AWS console (only through aws-cli), so adding tags is not as necessary.

Since this is a workaround, we can get back to it once the issue is fixed in the provider side 🙏

@FurqanHabibi FurqanHabibi requested a review from hanscg April 26, 2024 03:29
Copy link
Contributor

@hanscg hanscg left a comment

Choose a reason for hiding this comment

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

Since we're trying to use tag-based access control in IAM roles, I think it will complicates things if we can't modify the default tag for the resource.

I think it's better to leave it be and recreate the autoscaling target to resolve the default tag problem.

@FurqanHabibi
Copy link
Contributor Author

Closed in favor of recreating aws_appautoscaling_target to allow adding tags.

@FurqanHabibi FurqanHabibi deleted the provider-tags-fix branch April 26, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants