hashicorp/terraform — pull request #185 by tmtk75 (2014-08-12 07:59:39+00:00)
Title: Ensure attribute keys of security group

I encountered an issue that security groups were swapped and it was detected as a change when I executed plan subcommand. Terraform destroyed the instance and created a new one again. I think that's not expected behavior.

This pull request is to fix the issue and added a few test cases.

```
~ aws_eip.fluentd
instance: "i-d17fd2c8" => "${aws_instance.fluentd.id}"

-/+ aws_instance.fluentd
availability_zone: "ap-northeast-1c" => ""
key_name: "id_rsa" => ""
private_dns: "ip-192-168-11-223.ap-northeast-1.compute.internal" => ""
private_ip: "192.168.11.223" => ""
public_dns: "" => ""
public_ip: "54.64.24.211" => ""
security_groups: "" => ""
security_groups.0: "sg-d7cf37b2" => "sg-d6cf37b3" (forces new resource)
security_groups.1: "sg-d6cf37b3" => "sg-d7cf37b2" (forces new resource)
subnet_id: "subnet-1df4f45b" => ""
```