nerdexam
HashiCorp

TA-002-P · Question #342

While attempting to deploy resources into your cloud provider using Terraform. you begin to see some odd behavior and experience sluggish responses. In order to troubleshoot you decide to turn on…

The correct answer is B. TF_LOG. To enable verbose logging for troubleshooting Terraform issues, you must set the TF_LOG environment variable. This variable controls the logging level for Terraform and its providers.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

While attempting to deploy resources into your cloud provider using Terraform. you begin to see some odd behavior and experience sluggish responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?

Options

  • ATF_10G_PATM
  • BTF_LOG
  • CTF_10G_LEVEL
  • DTF.LOG.FUE

How the community answered

(42 responses)
  • A
    2% (1)
  • B
    95% (40)
  • C
    2% (1)

Why each option

To enable verbose logging for troubleshooting Terraform issues, you must set the `TF_LOG` environment variable. This variable controls the logging level for Terraform and its providers.

ATF_10G_PATM

`TF_10G_PATM` is not a standard Terraform environment variable for logging.

BTF_LOGCorrect

The `TF_LOG` environment variable is used to set the logging level for Terraform's core and its providers, allowing you to enable verbose debugging output. By setting `TF_LOG` to levels like `TRACE`, `DEBUG`, `INFO`, `WARN`, or `ERROR`, you can gain detailed insight into Terraform's operations during troubleshooting.

CTF_10G_LEVEL

`TF_10G_LEVEL` is not a standard Terraform environment variable; `TF_LOG` controls the level directly or `TF_LOG_PATH` can be used with `TF_LOG` to specify a file.

DTF.LOG.FUE

`TF.LOG.FUE` is not a standard Terraform environment variable for logging.

Concept tested: Terraform debugging and logging

Source: https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_log

Topics

#Terraform CLI#Debugging#Logging#Environment Variables

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice