-
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
duplicate security group #9778
Comments
Hey @tomstachura – do you have any more information regarding the other security groups? What other rules are present there, are they managed by Terraform, if so do those resources have other |
Hi – feel free to look through the entire setup – attached. Tom Tom Stachura From: Clint [mailto:[email protected]] Hey @tomstachura https://github.com/tomstachura – do you have any more information regarding the other security groups? What other rules are present there, are they managed by Terraform, if so do those resources have other aws_security_group_rule resources involved or any rules defined inline? Any more information you can share without exposing secrets would be greatly appreciated — |
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. |
This is pointing me to pages of discussion from over a year ago. Seems this bug is still happening
2 error(s) occurred:
a side effect of a now-fixed Terraform issue causing two security groups with
identical attributes but different source_security_group_ids to overwrite each
other in the state. See Consider security groups with source security groups when hashing #2376 for more
information and instructions for recovery. Error message: the specified rule "peer: 199.58.192.98/32, TCP, from port: 22, to port: 22, ALLOW" already exists
a side effect of a now-fixed Terraform issue causing two security groups with
identical attributes but different source_security_group_ids to overwrite each
other in the state. See Consider security groups with source security groups when hashing #2376 for more
information and instructions for recovery. Error message: the specified rule "peer: 35.161.227.236/32, TCP, from port: 22, to port: 22, ALLOW" already exists
I have 2 of these pointing to 2 different security groups. If I have just 1 of these, it works. If I have 2 it fails with the above.
resource "aws_security_group_rule" "admin" {
type = "ingress"
from_port = 22
to_port = 22
protocol = "tcp"
security_group_id = "${aws_security_group.admin.id}" # for the 2nd one, this was changed to another ID
cidr_blocks = ["${var.admin_ips[count.index]}/32"]
count = "${length(var.admin_ips)}"
}
The text was updated successfully, but these errors were encountered: