nerdexam
HashiCorp

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.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, 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)
  • B
    94% (29)
  • C
    3% (1)
  • D
    3% (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.

ATF_help

TF_help is not a standard environment variable for controlling Terraform logging.

BTF LOGCorrect

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.

CTF_Debug

TF_Debug is not the correct environment variable for enabling Terraform logging; the correct one is TF_LOG.

DTF_var_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

#Terraform logging#Environment variables#Debugging#Terraform CLI

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice