TF_LOG
The environment variable that turns on Terraform's detailed logs and sets their level.
Verbose logs can include sensitive values and request details.
In more detail
Levels from most to least detail are TRACE, DEBUG, INFO, WARN and ERROR, and JSON gives machine-readable TRACE output. TF_LOG_CORE and TF_LOG_PROVIDER set the level for Terraform itself or for providers separately. Logs can contain secrets, so share them with care.
Example
TF_LOG=DEBUG terraform planRelated terms
- TF_LOG_PATH — The environment variable that writes Terraform's logs to a file instead of the terminal.
- log level — A label on each log message saying how serious it is, from debug and info up to error, critical and emergency.
- DEBUG — The most detailed log level, for values and branches that only help a developer reproducing a fault.
Taught in
- Verbose Logging: TF_LOG And Friends — HashiCorp Terraform Associate (004) Exam Prep
- The Full Mock: Sixty Minutes, Eight Areas, One Plan For The Last Week — HashiCorp Terraform Associate (004) Exam Prep