-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
aws_security_group diff didn't match during apply #529
Comments
Subsequent slightly less-sad 🐼 is slightly less sad. |
I am having this issue as well. Doing some testing, I am pretty sure it comes down to having 2 ingress with 1 port range. Meaning:
If I remove the security_groups = ["${aws_security_group.SG_2.id}"] and just leave self true, it works. having them both seems to give the diffs didn't match problem. I also tried breaking that up into 3 ingress:
I get the same error with it, HOWEVER, if I comment out the ingress with the security_groups and apply, it succeeds. If I uncomment the security_groups ingress block, and comment out the 2 self = true ingress blocks, it also succeeds. It seems to be something about self = true, and security_groups not playing well together when it is the same from_port/to_port. |
Simple example where this reoccurs: resource "aws_security_group" "sg1" {
} resource "aws_security_group" "sg2" {
} |
@delitescere @btaylor-okta @spyrospph any change you could try this again with the latest code from master? PR #661 should fix this issue. |
Just reproduced this problem with the TF config posted by @spyrospph at commit 81f008b (dated 26 days ago). After switching to master I could not reproduce the problem anymore using the same config. So closing this one as it's confirmed to be fixed by PR #661 |
@svanharmelen I'm running TF 0.3.7 and ran into this issue. The workaround provided by @btaylor-okta got it running for me.
Truncated working config:
|
@zxjinn could you maybe give a small (but complete) config (obfuscated of course) to reproduce your issue? And maybe some logging generated with Wondering if this is really the same issue, but then I will give it a go to see what is going wrong. |
@svanharmelen Got it! See the gist for the config file and the output. |
I am having the same issue but when applying multiple IPs. @btaylor-okta workaround does not work for me. The only way to fix it is to run terraform apply a second time so far My use case I am white listing a bunch of public IPs from an aws_instance resource to a security group.
|
We are seeing "aws_security_group.nodes: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue." as well on v0.6.16 using remote state outputs like the following. We are using AWS VPC peering and populating sec group cidr blocks from the remote state of another TF project. If I ran terraform apply a second time, the deployment completes successfully.
|
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
sad 🐼 is sad (v0.3.1)
$ terraform plan -out plan ... $ terraform apply plan ...creating some stuff... Error applying plan: aws_security_group.public: diffs didn't match during apply. This is a bug with the resource provider, please report a bug.
The text was updated successfully, but these errors were encountered: