How do you pass several var files and what is the result of overlapping keys?
IntermediateConceptVariables, Locals, Outputs and Types
Answer
Repeat -var-file. They are processed in order and later values override earlier ones, as do -var flags mixed in at the position they appear.
terraform plan -var-file=common.tfvars -var-file=prod.tfvars -var="replicas=6"
More on Variables, Locals, Outputs and Types
How do you declare an input variable?BeginnerIn what order does Terraform load variable values?BeginnerHow do you define an output and what is it for?BeginnerWhat is the difference between locals and variables?BeginnerWhat are the primitive types in Terraform?BeginnerHow do list, set and map differ?Intermediate