Which tfvars files are loaded automatically?
BeginnerConceptVariables, Locals, Outputs and Types
Answer
terraform.tfvars, terraform.tfvars.json, and any *.auto.tfvars or *.auto.tfvars.json in the working directory. Any other file, such as prod.tfvars, must be passed with -var-file=prod.tfvars. Terraform does not load tfvars from child module directories.
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