-
Notifications
You must be signed in to change notification settings - Fork 22
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 tagging collision for VPC network peering resources #1215
Conversation
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.
We want these resources to be tagged though, right? Do we need to introduce another method of tagging them?
@jameshochadel Yeah, we want them to be tagged, but as is, this code just produces confusion because it makes the
I've tried to fix it and keep the It's some permutation of this bug caused by us having multiple |
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.
Ahh you figured it out! Fantastic news!
Changes proposed in this pull request:
Due to a collision in the tags applied on the
aws_vpc_peering_connection
andaws_vpc_peering_connection_accepter
resources, Terraform always thinks there are changes to apply for one resource, even when nothing has changed. The output fromterraform plan
looks something like:This behavior is problematic because it causes our CI system to send us a message in Slack telling us to review the
terraform plan
output, when in reality nothing has changed or needs to change.The problem turned out to be caused by the fact that the Terraform
aws_vpc_peering_connection
andaws_vpc_peering_connection_accepter
resources actually managed a single AWS VPC peering connection resource. So definingtags
on both Terraform resources and having default tags (tags_all
) from different providers apply to each resource was causing Terraform to get persistently confused about which tags to apply.The changes in this PR update the
aws_vpc_peering_connection_accepter
Terraform resource to ignore changes totags
andtags_all
(default tags), which is fine, because tags (includingName
) are set on theaws_vpc_peering_connection
resource. And this change resolves the persistent confusion and detection of changes by Terraform.security considerations
None