TERRAFORM-ASSOCIATE-003 practice question 10 of 30
[Read, Generate, and Modify Configurations] Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.
Full set: 226 questionsSetting the TFLOG environment variable to DEBUG does enable detailed logging for Terraform's core and providers. However, by default, this log output is sent to the stderr (standard error) stream, not the stdout (standard output) stream. This separation ensures that diagnostic and debug information does not interfere with the primary, often machine-readable, output of commands like terraform plan or terraform show, which are directed to stdout.
The statement "True" is incorrect because it misidentifies the standard stream used for logging. Terraform explicitly directs log output to stderr to keep it separate from the command's primary result on stdout.
1. HashiCorp Terraform Documentation
"Debugging Terraform": "To enable logging
set the TFLOG environment variable to one of the log levels (TRACE
DEBUG
INFO
WARN
ERROR) to display logs. ... By default
the log is sent to stderr."
Source: HashiCorp
Terraform CLI Documentation
"Debugging Terraform". Retrieved from https://developer.hashicorp.com/terraform/cli/commands/debug
2. HashiCorp Terraform Documentation
"Environment Variables": Under the TFLOG section
the documentation confirms the behavior: "By default
the log is sent to stderr. To send the log to a file
set the TFLOGPATH environment variable."
Source: HashiCorp
Terraform CLI Documentation
"Environment Variables". Retrieved from https://developer.hashicorp.com/terraform/cli/config/environment-variables#tflog
Keep practicing
Take the free TERRAFORM-ASSOCIATE-003 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other TERRAFORM-ASSOCIATE-003 practice questions
- Question 1[Understand Terraform Basics and CLI] If you update the version constraint in your Terraf…
- Question 2[Navigate Terraform State and Backends] Terraform variable names are saved in the state f…
- Question 3[Understand Terraform Basics and CLI] You modified your Terraform configuration and run T…
- Question 4[Understand Terraform Basics and CLI] You must use different Terraform commands depending…
- Question 6[Understand Terraform Basics and CLI] terraform init creates an example main.tf file in t…
- Question 7[Understand Terraform Basics and CLI] terraform validate confirms that your infrastructur…
