Docs
Troubleshooting

Troubleshooting

Terraform

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 in your Terrateam configuration file .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.

Terraform debugging produces a lot of output.

For more information on debugging Terraform, please see the official Hashicorp Terraform documentation (opens in a new tab).

Terrateam

To view logs from a Terrateam operation:

  1. Navigate to the main page of your Terraform repository on GitHub and select Actions

GitHub Actions Tab

  1. Select the Terrateam Workflow run you'd like to investigate

GitHub Actions Terrateam Workflow

  1. Select Terrateam Action

GitHub Actions Terrateam Action

  1. Expand Run Terrateam Action

GitHub Actions Run Terrateam Action

If you need help investigating a Terrateam workflow run, please join our Community Slack.