nerdexam
HashiCorpHashiCorp

TA-002-P · Question #386

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

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

Explanation

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.

Common mistakes.

  • A. TF_help is not a standard environment variable for controlling Terraform logging.
  • C. TF_Debug is not the correct environment variable for enabling Terraform logging; the correct one is TF_LOG.
  • D. 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

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