{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/9778","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/9778/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/9778/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/9778/events","html_url":"https://github.com/hashicorp/terraform/issues/9778","id":186593479,"number":9778,"title":"duplicate security group","user":{"login":"tomstachura","id":2257825,"avatar_url":"https://avatars.githubusercontent.com/u/2257825?v=3","gravatar_id":"","url":"https://api.github.com/users/tomstachura","html_url":"https://github.com/tomstachura","followers_url":"https://api.github.com/users/tomstachura/followers","following_url":"https://api.github.com/users/tomstachura/following{/other_user}","gists_url":"https://api.github.com/users/tomstachura/gists{/gist_id}","starred_url":"https://api.github.com/users/tomstachura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomstachura/subscriptions","organizations_url":"https://api.github.com/users/tomstachura/orgs","repos_url":"https://api.github.com/users/tomstachura/repos","events_url":"https://api.github.com/users/tomstachura/events{/privacy}","received_events_url":"https://api.github.com/users/tomstachura/received_events","type":"User","site_admin":false},"labels":[{"id":85946957,"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":127939518,"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc","default":false},{"id":120957393,"url":"https://api.github.com/repos/hashicorp/terraform/labels/waiting-response","name":"waiting-response","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-01T17:24:13Z","updated_at":"2016-11-07T20:29:18Z","closed_at":null,"body":"This is pointing me to pages of discussion from over a year ago. Seems this bug is still happening\r\n\r\n2 error(s) occurred:\r\n\r\n* aws_security_group_rule.ivory.0: [WARN] A duplicate Security Group rule was found on (sg-4f0f7836). This may be\r\na side effect of a now-fixed Terraform issue causing two security groups with\r\nidentical attributes but different source_security_group_ids to overwrite each\r\nother in the state. See https://github.com/hashicorp/terraform/pull/2376 for more\r\ninformation 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\r\n* aws_security_group_rule.ivory.1: [WARN] A duplicate Security Group rule was found on (sg-4f0f7836). This may be\r\na side effect of a now-fixed Terraform issue causing two security groups with\r\nidentical attributes but different source_security_group_ids to overwrite each\r\nother in the state. See https://github.com/hashicorp/terraform/pull/2376 for more\r\ninformation 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\r\n\r\n\r\n\r\nI 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.\r\nresource \"aws_security_group_rule\" \"admin\" {\r\n  type = \"ingress\"\r\n  from_port   = 22\r\n  to_port     = 22\r\n  protocol    = \"tcp\"\r\n  security_group_id = \"${aws_security_group.admin.id}\" # for the 2nd one, this was changed to another ID\r\n  cidr_blocks = [\"${var.admin_ips[count.index]}/32\"]\r\n\r\n  count       = \"${length(var.admin_ips)}\"\r\n}\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/258953005","html_url":"https://github.com/hashicorp/terraform/issues/9778#issuecomment-258953005","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/9778","id":258953005,"user":{"login":"tomstachura","id":2257825,"avatar_url":"https://avatars.githubusercontent.com/u/2257825?v=3","gravatar_id":"","url":"https://api.github.com/users/tomstachura","html_url":"https://github.com/tomstachura","followers_url":"https://api.github.com/users/tomstachura/followers","following_url":"https://api.github.com/users/tomstachura/following{/other_user}","gists_url":"https://api.github.com/users/tomstachura/gists{/gist_id}","starred_url":"https://api.github.com/users/tomstachura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomstachura/subscriptions","organizations_url":"https://api.github.com/users/tomstachura/orgs","repos_url":"https://api.github.com/users/tomstachura/repos","events_url":"https://api.github.com/users/tomstachura/events{/privacy}","received_events_url":"https://api.github.com/users/tomstachura/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T20:29:18Z","updated_at":"2016-11-07T20:29:18Z","body":"Hi – feel free to look through the entire setup – attached.\n\n \n\nTom\n\n \n\nTom Stachura\n <tel:1-604-525-7096> 1-604-525-7096 /  <mailto:tom@unoworks.ca> tom@unoworks.ca\n <https://twitter.com/tomstachura>   <https://www.linkedin.com/profile/view?id=4191438> \n\n \n\nFrom: Clint [mailto:notifications@github.com] \nSent: Thursday, November 3, 2016 07:46\nTo: hashicorp/terraform <terraform@noreply.github.com>\nCc: Tom Stachura <tom@unoworks.ca>; Mention <mention@noreply.github.com>\nSubject: Re: [hashicorp/terraform] duplicate security group (#9778)\n\n \n\nHey @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 \n\n—\nYou are receiving this because you were mentioned.\nReply to this email directly, view it on GitHub <https://github.com/hashicorp/terraform/issues/9778#issuecomment-258163006> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ACJzocB7FBx2lQdwJXHncR4Oj1tS-Ds1ks5q6fO1gaJpZM4KmWOz> .  <https://github.com/notifications/beacon/ACJzoZfezMV7EPVbnH4sSG9vApBbCInvks5q6fO1gaJpZM4KmWOz.gif> \n\n"}}
{"actor":{"display_login":"tomstachura"}}