terraforming icon indicating copy to clipboard operation
terraforming copied to clipboard

Doesnt import security groups with non-unique names properly

Open myoung34 opened this issue 8 years ago • 5 comments

If i have two security groups named foo it will generate duplicate aws_security_group.foo blocks, which cause a non-unique issue in terraform

1 error(s) occurred:

* module root: 1 error(s) occurred:

* aws_security_group.foo: resource repeated multiple times

myoung34 avatar Jul 15 '17 18:07 myoung34

Are the security groups in VPC? If so, Terraforming adds VPC ID as prefix to avoid duplication.

Because I don't have EC2-Classic environments, I can't reproduce the behavior. Is the duplication of Security Group names allowed in EC2-Classic?

dtan4 avatar Jul 26 '17 15:07 dtan4

They are in VPC, and it does prefix them, but you can still have multiple security groups with the same name in AWS (in a vpc or not), but in TF you cant (vpc_a_foo is still a conflict with vpc_a_foo)

myoung34 avatar Jul 26 '17 16:07 myoung34

This applies to https://github.com/dtan4/terraforming/issues/312 and to every other situation in which a resource can have a similar value for the Name tag.

dgonzalezruiz avatar Aug 28 '17 12:08 dgonzalezruiz

What's the fix @dtan4 ? This bug is over a year ago.

pkr1234 avatar Jul 17 '18 13:07 pkr1234

Did this get fixed?

mhemken-nyt avatar Feb 06 '20 20:02 mhemken-nyt