Use verbose logging
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing HashiCorp Certified: Terraform Associate premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- Turning on Terraform's logs
- Scoping logs to core, providers, or JSON
- Persisting logs and reading a crash
- Exam-pattern recognition
The TF_LOG* environment variable family
| Aspect | TF_LOG | TF_LOG_CORE / TF_LOG_PROVIDER | TF_LOG_PATH |
|---|---|---|---|
| Controls | All logs (Core and providers) | Core-only or provider-only logs | Where logs are written |
| Accepts | TRACE..ERROR, JSON, or any value | TRACE..ERROR | A file path |
| Enables logging on its own? | Yes | Yes, for its subset | No, needs a TF_LOG* level too |
| Output destination | stderr | stderr | Appended to the named file |
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.