terraform plan output.
Run a normal plan
Start with the default, concise behavior to compare outputs:Enable Terraform logging
Terraform supports the following log levels:TRACE, DEBUG, INFO, WARN, and ERROR. TRACE is the most verbose and is useful when you need deep internals. Use TF_LOG to set the log level and TF_LOG_PATH to write logs to a file.
Examples below show platform-specific commands.
macOS / Linux (bash or zsh)
Enable trace logging for the current shell:TF_LOG_PATH:
Windows PowerShell
Enable TRACE logging in PowerShell:Windows CMD
Set environment variables in CMD:Stop logging
When finished debugging, unsetTF_LOG (and TF_LOG_PATH if set) to return to normal concise output.
On macOS / Linux:
Log level reference
Use the appropriate log level to control verbosity and reduce noise:Tips for sharing logs
Avoid sharing logs that may contain secrets, credentials, or sensitive identifiers. Use
TF_LOG_PATH to generate a log file you can inspect and sanitize before sharing. If you must send logs to HashiCorp or a provider support team, scrub or redact secrets first.When to use each level
ERROR/WARN— Good for routine runs to identify failures and warnings.INFO— Useful for understanding higher-level operations without too much noise.DEBUG— For investigating implementation-level behavior in Terraform or providers.TRACE— For the deepest visibility into Terraform core, provider RPCs, graph transforms, and diff internals. Reserve for difficult-to-diagnose issues.
Summary
UsingTF_LOG and TF_LOG_PATH helps you inspect Terraform internals (graph transforms, provider communications, validations, diffs) and can provide the necessary detail to debug complex provider or core issues. Always review and redact any sensitive data before sharing logs externally.