Question 770
An operator chooses the mechanism "TF_LOG_PROVIDER environment variable" for a Terraform project. Which outcome should this choice support?
Explanation
Correct Answer
The practical result of TF_LOG_PROVIDER environment variable, used to focus verbose diagnostics on provider-side activity, is: TF_LOG_PROVIDER controls the provider logging level to aid plugin or API troubleshooting. A qualification for this effect is: Provider logs may reveal credentials or request data and require caution.
Incorrect Answers
That outcome applies to TF_LOG_PATH environment variable, intended to write Terraform debug logging to a named file, rather than the question's feature TF_LOG_PROVIDER environment variable: TF_LOG_PATH controls a file destination for Terraform logging when logging is enabled. Unlike TF_LOG_PATH environment variable, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to write Terraform debug logging to a named file.
That outcome applies to TRACE diagnostic level, intended to capture highly detailed events for a stubborn Terraform problem, rather than the question's feature TF_LOG_PROVIDER environment variable: TRACE is a very verbose Terraform logging level useful for deep troubleshooting. Unlike TRACE diagnostic level, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to capture highly detailed events for a stubborn Terraform problem.
That outcome applies to TF_LOG_CORE environment variable, intended to focus debugging on Terraform Core behavior rather than provider messages, rather than the question's feature TF_LOG_PROVIDER environment variable: TF_LOG_CORE can set logging for Terraform Core separately from provider plugin output. Unlike TF_LOG_CORE environment variable, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to focus debugging on Terraform Core behavior rather than provider messages.
That outcome applies to TF_LOG environment variable, intended to enable Terraform debugging output while investigating a CLI failure, rather than the question's feature TF_LOG_PROVIDER environment variable: TF_LOG sets a supported logging level such as DEBUG or TRACE for a Terraform process. Unlike TF_LOG environment variable, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to enable Terraform debugging output while investigating a CLI failure.