Increasing the log level for runs in Terraform Enterprise can help with troubleshooting Terraform issues. To increase the log level:
- Log into Terraform Enterprise.
- Navigate to the organization and workspace experiencing the issue.
- Select the Variables area of the workspace.
- In the “Environment Variables” section, click the “Edit” slider
- Add an environment variable named
TF_LOG
and set its value toDEBUG
(case sensitive), then save the variables.
In some cases it may be necessary to further increase the logging by setting the value to TRACE
.
Once the environment variable TF_LOG
is set, execute another run to generate the debug or trace log. If you need to send the log to HashiCorp support, use View raw log and save the raw log to a file. Compress the file if it’s large; log files compress well.
Once the issue is resolved, delete the TF_LOG
environment variable to disable the enhanced logging.