Skip to main content

Logs

Occassionally, the terraform command does not behave as expected. In certain situations it can be helpful to enable Terraform debugging giving detailed logs useful for troubleshooting.

To enable Terraform debugging against a Terrateam run, set up the following hooks against your Terrateam configuration:

.terrateam/config.yml:

hooks:
plan:
pre:
- type: env
name: TF_LOG
cmd: ['echo', 'DEBUG']
post: []
apply:
pre:
- type: env
name: TF_LOG
cmd: ['echo', 'DEBUG']
post: []

Once these changes are pushed to your branch, Terrateam will execute terraform in debug mode TF_LOG=DEBUG exposing lots of information for the plan and apply.

info

Terraform debugging produces a lot of output

For more information on debugging Terraform, please see the official Hashicorp Terraform documentation.