nerdexam
HashiCorpHashiCorp

TA-002-P · Question #342

TA-002-P Question #342: Real Exam Question with Answer & Explanation

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

Explanation

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.

Common mistakes.

  • A. TF_10G_PATM is not a standard Terraform environment variable for logging.
  • C. 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.
  • D. TF.LOG.FUE is not a standard Terraform environment variable for logging.

Concept tested. Terraform debugging and logging

Reference. 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 PracticeBrowse All TA-002-P Questions