Terraform scaling VMs
Last updated:
TERRAFORM
- Define a var file with a list of objects, e.g. VMname, cpu, etc.
- Define resource block for VM.
- Upon apply, VMs are deployed in an order like : web[0], web[1], web[2] ![[Pasted image 20220504200506.png]]
- You can scale up/down from the end, i.e. specify web[3], web[4]. But removal will be LIFO, so web[4], web[3] and so on.
references: