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

duplicate security group #9778

Closed
tomstachura opened this issue Nov 1, 2016 · 3 comments
Closed

duplicate security group #9778

tomstachura opened this issue Nov 1, 2016 · 3 comments

Comments

@tomstachura
Copy link

This is pointing me to pages of discussion from over a year ago. Seems this bug is still happening

2 error(s) occurred:

  • aws_security_group_rule.ivory.0: [WARN] A duplicate Security Group rule was found on (sg-4f0f7836). This may be
    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
  • aws_security_group_rule.ivory.1: [WARN] A duplicate Security Group rule was found on (sg-4f0f7836). This may be
    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)}"
}

@catsby
Copy link
Contributor

catsby commented Nov 3, 2016

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 aws_security_group_rule resources involved or any rules defined inline? Any more information you can share without exposing secrets would be greatly appreciated

@catsby catsby added bug provider/aws waiting-response An issue/pull request is waiting for a response from the community labels Nov 3, 2016
@tomstachura
Copy link
Author

Hi – feel free to look through the entire setup – attached.

Tom

Tom Stachura
tel:1-604-525-7096 1-604-525-7096 / mailto:[email protected] [email protected]
https://twitter.com/tomstachura https://www.linkedin.com/profile/view?id=4191438

From: Clint [mailto:[email protected]]
Sent: Thursday, November 3, 2016 07:46
To: hashicorp/terraform [email protected]
Cc: Tom Stachura [email protected]; Mention [email protected]
Subject: Re: [hashicorp/terraform] duplicate security group (#9778)

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


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #9778 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/ACJzocB7FBx2lQdwJXHncR4Oj1tS-Ds1ks5q6fO1gaJpZM4KmWOz . https://github.com/notifications/beacon/ACJzoZfezMV7EPVbnH4sSG9vApBbCInvks5q6fO1gaJpZM4KmWOz.gif

@mitchellh mitchellh removed the waiting-response An issue/pull request is waiting for a response from the community label Dec 1, 2016
@ghost
Copy link

ghost commented Apr 10, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants