Which option would log trace-level information about provider loading when debugging Terraform?

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

Multiple Choice

Which option would log trace-level information about provider loading when debugging Terraform?

Explanation:
Terraform logs are controlled by the TF_LOG environment variable; the value you set determines how verbose the logging is. To capture detailed information about provider loading, you want the TRACE level, so you would set TF_LOG=TRACE. If you also want the logs written to a file, TF_LOG_PATH can specify that destination, but it doesn’t change the level of logging. Other options don’t configure logging: TF_VAR_log=TRACE passes a Terraform variable named log, which isn’t used for controlling Terraform’s logs; TF_LOG_DEBUG isn’t a separate variable—logging level is chosen with TF_LOG, using TRACE for the most detail or DEBUG for less verbose output.

Terraform logs are controlled by the TF_LOG environment variable; the value you set determines how verbose the logging is. To capture detailed information about provider loading, you want the TRACE level, so you would set TF_LOG=TRACE. If you also want the logs written to a file, TF_LOG_PATH can specify that destination, but it doesn’t change the level of logging. Other options don’t configure logging: TF_VAR_log=TRACE passes a Terraform variable named log, which isn’t used for controlling Terraform’s logs; TF_LOG_DEBUG isn’t a separate variable—logging level is chosen with TF_LOG, using TRACE for the most detail or DEBUG for less verbose output.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy