{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/4872","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/4872/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/4872/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/4872/events","html_url":"https://github.com/hashicorp/terraform/issues/4872","id":129422585,"number":4872,"title":"providers/aws: aws_security_group v0.6.10 regression","user":{"login":"pmoust","id":2493339,"avatar_url":"https://avatars.githubusercontent.com/u/2493339?v=3","gravatar_id":"","url":"https://api.github.com/users/pmoust","html_url":"https://github.com/pmoust","followers_url":"https://api.github.com/users/pmoust/followers","following_url":"https://api.github.com/users/pmoust/following{/other_user}","gists_url":"https://api.github.com/users/pmoust/gists{/gist_id}","starred_url":"https://api.github.com/users/pmoust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmoust/subscriptions","organizations_url":"https://api.github.com/users/pmoust/orgs","repos_url":"https://api.github.com/users/pmoust/repos","events_url":"https://api.github.com/users/pmoust/events{/privacy}","received_events_url":"https://api.github.com/users/pmoust/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/waiting-response","name":"waiting-response","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-01-28T11:22:26Z","updated_at":"2016-02-04T20:19:40Z","closed_at":null,"body":"Running `terraform plan -out /tmp/plan -target=aws_security_group.pph_webserver` with terraform v0.6.10\r\n\r\nNo change in the terraform resource. This happens to other SGs as well (not all of them though), added one resource to refrain from TL;DR.\r\n\r\nExpected result: no change plan\r\nActual results pasted below\r\n\r\nIn 0.6.9 it's ok.\r\n\r\n```hcl\r\nresource \"aws_security_group\" \"pph_webserver\" {\r\n     name        = \"pph_webserver\"\r\n     vpc_id      = \"${aws_vpc.pph.id}\"\r\n     ingress {\r\n           from_port   = 80\r\n           to_port     = 80\r\n           protocol    = \"tcp\"\r\n           self        = true\r\n      }\r\n }\r\n```\r\n```\r\n~/pph/pph-iac/terraform/peopleperhour   master ●  terraform plan -out /tmp/plan -target=aws_security_group.pph_webserver\r\nRefreshing Terraform state prior to plan...\r\n\r\naws_vpc.pph: Refreshing state... (ID: vpc-871689e2)\r\naws_security_group.pph_webserver: Refreshing state... (ID: sg-d0b443b4)\r\n\r\nThe Terraform execution plan has been generated and is shown below.\r\nResources are shown in alphabetical order for quick scanning. Green resources\r\nwill be created (or destroyed and then created if an existing resource\r\nexists), yellow resources are being changed in-place, and red resources\r\nwill be destroyed.\r\n\r\nYour plan was also saved to the path below. Call the \"apply\" subcommand\r\nwith this plan file and Terraform will exactly execute this execution\r\nplan.\r\n\r\nPath: /tmp/plan\r\n\r\n~ aws_security_group.pph_webserver\r\n    ingress.1844393598.cidr_blocks.#:              \"0\" => \"0\"\r\n    ingress.1844393598.from_port:                  \"\" => \"80\"\r\n    ingress.1844393598.protocol:                   \"\" => \"tcp\"\r\n    ingress.1844393598.security_groups.#:          \"0\" => \"0\"\r\n    ingress.1844393598.self:                       \"\" => \"1\"\r\n    ingress.1844393598.to_port:                    \"\" => \"80\"\r\n    ingress.2938818379.cidr_blocks.#:              \"0\" => \"0\"\r\n    ingress.2938818379.from_port:                  \"80\" => \"0\"\r\n    ingress.2938818379.protocol:                   \"tcp\" => \"\"\r\n    ingress.2938818379.security_groups.#:          \"1\" => \"0\"\r\n    ingress.2938818379.security_groups.1214646136: \"sg-d8b443bc\" => \"\"\r\n    ingress.2938818379.self:                       \"1\" => \"0\"\r\n    ingress.2938818379.to_port:                    \"80\" => \"0\"\r\n\r\n\r\nPlan: 0 to add, 1 to change, 0 to destroy.\r\n```\r\n\r\nState diff\r\n```\r\ndiff --git a/terraform/peopleperhour/terraform.tfstate b/terraform/peopleperhour/terraform.tfstate\r\nindex c00ea98..c86f417 100644\r\n--- a/terraform/peopleperhour/terraform.tfstate\r\n+++ b/terraform/peopleperhour/terraform.tfstate\r\n@@ -1,6 +1,6 @@\r\n {\r\n     \"version\": 1,\r\n-    \"serial\": 1111,\r\n+    \"serial\": 1112,\r\n     \"modules\": [\r\n         {\r\n             \"path\": [\r\n@@ -7435,12 +7435,13 @@\r\n                             \"egress.482069346.to_port\": \"0\",\r\n                             \"id\": \"sg-d0b443b4\",\r\n                             \"ingress.#\": \"1\",\r\n-                            \"ingress.1844393598.cidr_blocks.#\": \"0\",\r\n-                            \"ingress.1844393598.from_port\": \"80\",\r\n-                            \"ingress.1844393598.protocol\": \"tcp\",\r\n-                            \"ingress.1844393598.security_groups.#\": \"0\",\r\n-                            \"ingress.1844393598.self\": \"true\",\r\n-                            \"ingress.1844393598.to_port\": \"80\",\r\n+                            \"ingress.2938818379.cidr_blocks.#\": \"0\",\r\n+                            \"ingress.2938818379.from_port\": \"80\",\r\n+                            \"ingress.2938818379.protocol\": \"tcp\",\r\n+                            \"ingress.2938818379.security_groups.#\": \"1\",\r\n+                            \"ingress.2938818379.security_groups.1214646136\": \"sg-d8b443bc\",\r\n+                            \"ingress.2938818379.self\": \"true\",\r\n+                            \"ingress.2938818379.to_port\": \"80\",\r\n                             \"name\": \"pph_webserver\",\r\n```"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/180031814","html_url":"https://github.com/hashicorp/terraform/issues/4872#issuecomment-180031814","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/4872","id":180031814,"user":{"login":"r0p0s3c","id":15878019,"avatar_url":"https://avatars.githubusercontent.com/u/15878019?v=3","gravatar_id":"","url":"https://api.github.com/users/r0p0s3c","html_url":"https://github.com/r0p0s3c","followers_url":"https://api.github.com/users/r0p0s3c/followers","following_url":"https://api.github.com/users/r0p0s3c/following{/other_user}","gists_url":"https://api.github.com/users/r0p0s3c/gists{/gist_id}","starred_url":"https://api.github.com/users/r0p0s3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r0p0s3c/subscriptions","organizations_url":"https://api.github.com/users/r0p0s3c/orgs","repos_url":"https://api.github.com/users/r0p0s3c/repos","events_url":"https://api.github.com/users/r0p0s3c/events{/privacy}","received_events_url":"https://api.github.com/users/r0p0s3c/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T20:19:40Z","updated_at":"2016-02-04T20:19:40Z","body":"Correct, the issue I was having was with aws_security_group, so inline rules. Ingress/egress rules such as this:\r\n\r\n```\r\nresource \"aws_security_group\" \"g1\" {\r\n    ingress {\r\n        from_port = 22\r\n        to_port = 22\r\n        protocol = \"tcp\"\r\n        self = true\r\n        security_groups = [\"${aws_security_group.g2.id}\"]\r\n    }\r\n}\r\n```\r\n\r\npreviously did not work for me."}}