Notifications
Clear all
Topic starter
10/07/2022 3:35 am
You have a Terraform configuration file where a variable itemNum is defined as follows:
variable "itemNum" { default = 3}
You also have a defined the following environment variables in your shell: TF_itemNum =6, TF_VAR_itemNum =9. You also have a terraform.tfvars file with the following contents
itemNum = 7
When you run the following apply command, what is the value assigned to the itemNum variable?
terraform apply -var itemNum =4
- A . 10
- B . 6
- C . 1
- D . 4
- E . 3
Suggested Answer: D
Explanation:
The -var and -var-file methods of assigning variables have the highest precedence. https://www.terraform.io/docs/configuration/variables.html
Explanation:
The -var and -var-file methods of assigning variables have the highest precedence. https://www.terraform.io/docs/configuration/variables.html