Tags for existing EC2

I have say 1000 ec2 ,

900 of them will need
Tag1= value1

Tags1= value2

And last 50

i would think of reading input from csv& add tags in some kind of for loop for

Global tags may not work in my case & i did not find any option for my case in - Terraform Registry

Is this possible to read input from csv & update the tags with for_each &
resource “aws_ec2_tag”

I don’t think Terraform will be able to help with this scenario because Terraform being a DSL, you will need to add the tags to each EC2 instances configuration.

1 Like