Which environment variables do you use to control Terraform?
IntermediateConceptWorkflow and CLI
Answer
TF_LOG (TRACE, DEBUG, INFO, WARN, ERROR) with TF_LOG_PATH for debugging, TF_VAR_name for variables, TF_IN_AUTOMATION=1 to trim hints in CI, TF_INPUT=0 to disable prompts, TF_CLI_ARGS_plan for default flags, TF_DATA_DIR to relocate .terraform, and TF_PLUGIN_CACHE_DIR to share provider downloads.
More on Workflow and CLI
What does `terraform init` do?BeginnerWhat does `terraform plan` do?BeginnerWhat does `terraform apply` do and what is `-auto-approve`?BeginnerWhat does `terraform destroy` do?BeginnerWhat do `terraform fmt` and `terraform validate` check?BeginnerWhy save a plan with `-out` and apply that file?Intermediate