Exam Terraform-Associate-004 Topic 5 Question 239 Discussion

Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 239
Topic #: 5
You've enabled DEBUG-level logging for Terraform, and you'd like to send the log data to a file. Which action should you take?

Suggested Answer: A Vote an answer

Rationale for Correct Answer: Terraform logging is controlled via environment variables. TF_LOG sets the verbosity (e.g., DEBUG), and TF_LOG_PATH directs Terraform to write those logs to a specified file path.
This is part of Terraform CLI troubleshooting and operational usage.
Analysis of Incorrect Options (Distractors):
B (Update the Terraform CLI configuration file): The CLI config can control some behaviors (credentials helpers, plugin cache, etc.), but log-to-file is specifically handled by TF_LOG_PATH.
C (Add a path argument to the terraform block): The terraform block configures required versions, required providers, and backends-not CLI logging output.
D (Run the terraform output command): terraform output displays output values from state; it has nothing to do with logging.
Key Concept: Terraform debugging and logging via environment variables (TF_LOG, TF_LOG_PATH).
Reference: Terraform Objectives - Understand Terraform Basics and CLI (CLI workflow, troubleshooting
/logging).

by Louise at Aug 23, 2026, 12:19 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10