TA-002-P · Question #386
Jack is a newbieto Terraform and wants to enable detailed logging to find all the details. Which environment variable does he need to set?
The correct answer is B. TF LOG. To enable detailed logging for Terraform operations, the TF_LOG environment variable should be set to a desired log level, such as TRACE for the most verbose output.
Question
Jack is a newbieto Terraform and wants to enable detailed logging to find all the details. Which environment variable does he need to set?
Options
- ATF_help
- BTF LOG
- CTF_Debug
- DTF_var_log
How the community answered
(31 responses)- B94% (29)
- C3% (1)
- D3% (1)
Why each option
To enable detailed logging for Terraform operations, the `TF_LOG` environment variable should be set to a desired log level, such as TRACE for the most verbose output.
TF_help is not a standard environment variable for controlling Terraform logging.
The TF_LOG environment variable controls Terraform's logging level, and setting it to values like TRACE, DEBUG, INFO, WARN, or ERROR enables detailed output that can help troubleshoot and understand Terraform's internal operations. Setting it to TRACE provides the most verbose output.
TF_Debug is not the correct environment variable for enabling Terraform logging; the correct one is TF_LOG.
TF_var_log is not a standard environment variable for controlling Terraform logging; it might be mistaken for variables or logging combined.
Concept tested: Terraform debugging and logging
Source: https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_log
Topics
Community Discussion
No community discussion yet for this question.