Question 480
A compliance-minded cloud team is writing infrastructure automation. The acceptance requirement is to choose a production variable file different from development's when planning. What approach addresses it directly?
Explanation
Correct Answer
-var-file supplies explicitly chosen input values. This meets the stated requirement to choose a production variable file different from development's when planning.
Incorrect Answers
Default input variable value is intended to run a module without specifying an optional setting each time; default provides a fallback for inputs not explicitly supplied. That is not the specific requirement to choose a production variable file different from development's when planning.
terraform.tfvars variable assignment is intended to supply environment-specific root values without editing variable declarations; tfvars files populate root module input variables. That is not the specific requirement to choose a production variable file different from development's when planning.
variable block type constraint is intended to reject a string when an input must be a numeric replica count; variable types define admissible shapes before resource use. That is not the specific requirement to choose a production variable file different from development's when planning.






HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests