Answer the question
In order to leave comments, you need to log in
How to iterate over servers in Terraform?
I have a dozen Transfer Servers, and two dozen users.
I need to go through the list of servers and create two users per server.
I read several docs ( https://blog.gruntwork.io/terraform-tips-tricks-lo... etc.) and tried, but it doesn't work.
Terraform is the newest - 1.0.3.
Advise, please.
Answer the question
In order to leave comments, you need to log in
Vitaly Karasik
Eugene, I want to do this Terraform
In general, ansible should do this.
Terraform for this task can only be used when creating new servers, since the internal state of the server is not reflected in any way in the state of the terraform.
The classic solution is to use the user data attribute in the ec2 instance configuration.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question