Interview Prep/Terraform/Variables, Locals, Outputs and Types

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.

All Terraform questions Roadmap: Terraform

More on Variables, Locals, Outputs and Types