Terraform

Whenever you run terraform apply, it prompts to enter a value for a given variable. How to avoid being prompted?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

While removing the variable is theoretically a correct answer, it will probably fail the execution.

You can use something like the -var option to provide the value and avoid being prompted to insert a value. Another option is to run export TF_VAR_=.