terraforming icon indicating copy to clipboard operation
terraforming copied to clipboard

terraforming ec2 state cannot handle duplicate Name tag

Open pkr1234 opened this issue 6 years ago • 2 comments

The EC2 instances have the same "Name" tag. When I run the terraforming command: terraforming ec2 --profile myprofile --tfstate > ./terraform.tfstate

It generates the state file but only for one instance per duplicate Name tag. For example: If two instances are running with Name tag - "My Instance", it will generate one entry in the state file.

pkr1234 avatar Jul 17 '18 13:07 pkr1234

Another problem in the command without --tfstate. The code file has duplicate resource names.

pkr1234 avatar Jul 17 '18 13:07 pkr1234

If you're using autoscaling, this can be problematic as it will generate static EC2 instances that are not linked to an ASG - they appear to be duplicate EC2 instances that just exist in the environment. Gotta know about this and perform hand surgery, I'm betting.

Vermyndax avatar Mar 18 '19 20:03 Vermyndax