TF_LOG_PATH
The environment variable that writes Terraform's logs to a file instead of the terminal.
In more detail
It only takes effect when TF_LOG is also set to a level. The file is appended to on each run, so name a new file per investigation.
Example
TF_LOG=TRACE TF_LOG_PATH=trace.log terraform planRelated terms
- TF_LOG — The environment variable that turns on Terraform's detailed logs and sets their level.
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