Tags for existing EC2

Hi,
I have say 1000 ec2 ,

900 of them will need
Tag1= value1

50
Tags1= value2

And last 50
Tag1=Value3

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