How can you provide variables using file to Terraform CLI without the need to specify the name of the variable definition file?
Experience Level: Junior
Tags: Terraform
Answer
Create a file terraform.tfvars or any .auto.tfvars. Terraform CLI automatically loads variables from variable definition files with these names.
Related Terraform job interview questions
Using Terraform CLI, how do you reformat your Terraform configuration files in the standard style?
Terraform JuniorWhat format does variable definition file use in Terraform?
Terraform JuniorHow can you pass variables to Terraform CLI console command?
Terraform JuniorUsing Terraform CLI, how can you experiment with Terraform interpolations?
Terraform JuniorThe Terraform CLI command terraform destroy is just a convenience alias. For which command?
Terraform Junior