Which environment variable must be configured to make Terraform's logging more verbose?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

Which environment variable must be configured to make Terraform's logging more verbose?

Explanation:
Controlling how verbose Terraform logs are is done with the TF_LOG environment variable. When you set TF_LOG to a level like DEBUG or TRACE, Terraform emits more detailed logs, helping you diagnose issues or understand what it's doing under the hood. By default logs are off, so you need this variable to enable them and choose the level of detail. If you also want logs written to a file, you can set TF_LOG_PATH to specify the file path. The other option names don't control verbosity in Terraform (for example, TF_LOG_FILE isn't a recognized variable), and a misspelled variable won't have any effect.

Controlling how verbose Terraform logs are is done with the TF_LOG environment variable. When you set TF_LOG to a level like DEBUG or TRACE, Terraform emits more detailed logs, helping you diagnose issues or understand what it's doing under the hood. By default logs are off, so you need this variable to enable them and choose the level of detail.

If you also want logs written to a file, you can set TF_LOG_PATH to specify the file path. The other option names don't control verbosity in Terraform (for example, TF_LOG_FILE isn't a recognized variable), and a misspelled variable won't have any effect.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy