Hi,
I am looking for some advice on how to best handle the application of multiple tfvars file. I am using Terraspace to deploy repeatable infrastructure to AWS which mainly consists of EC2 instances. I use tfvars file to seperate each environment and structure them like this:
If I make a change within my main.tf in order to get each environment to pick up the change, I have been running:
TS_ENV=api2 terraspace up eis_ec2_managedinfra_win
to deploy these changes against the infrastructure referenced in api2.tfvars. Then repeating that command, changing the TS_ENV for each tfvars and the more environments I add, the longer this is taking.
I am wondering if there is a way to iterate through all of the tfvars files one by one, applying the changes?
I’ve had a look at the layering documentation, but I’m struggling to work out if this applies to my use case as I’m not combining the environments, they are completely seperate from each other.
Is there a way to achieve what I want to achieve?
Cheers
Adam.