Add user_data in ec2 instance using terraform with file variable
I am trying to create multiple ec2 instance using terraform modules. As every instance will have different user data, I want to do this but it's giving error data "local_file" "user_data" { for_each = { for ec2 in var.ec2_instances :…