-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[Bug]: Ignore_tags not working as expected with ec2 module #36706
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
`default_tags` support for EC2 root block devices was introduced in hasicorp/terraform-provider-aws#33769, which is great ... except it makes the mix of `default_tags` and `tags` on a `root_block_device` perpetually showing drift even when there is none. The solution is to not remove the default tags config from the volume tags in ec2_instance. This diff fixes hashicorp#36448 for us in our environment (which references hashicorp#33769 as the change that introduced this bug). This diff possibly fixes hashicorp#36706 too, but we weren't hitting this issue.
`default_tags` support for EC2 root block devices was introduced in hasicorp/terraform-provider-aws#33769, which is great ... except it makes the mix of `default_tags` and `tags` on a `root_block_device` perpetually showing drift even when there is none. The solution is to not remove the default tags config from the volume tags in ec2_instance. This diff fixes hashicorp#36448 for us in our environment (which references hashicorp#33769 as the change that introduced this bug). This diff possibly fixes hashicorp#36706 too, but we weren't hitting this issue.
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
1 similar comment
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.72.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Terraform Core Version
1.7.4
AWS Provider Version
5.43.0
Affected Resource(s)
I am using ec2-instance module in AWS to create an EC2 instance. Here's the main.tf
I have created the instance using terraform. Tags specified are getting ignored, whereas volume_tags are not getting iignored.
Expected Behavior
Instance tags as well as Volume_tags getting ignore.
Actual Behavior
This is the terraform plan output. As we can see it is detecting the changes in volume tags. It is changing the volume tags' value to null, which it shouldn't as we mentioned terraform to ignore the tags.
However it is working as expected if we use resource blocks to create EC2 instance and EBS volume respectively.
So is this an issue with module. Any suggestions/workarounds for this please?
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: