Skip to content

Instantly share code, notes, and snippets.

@DevoKun
Created May 7, 2019 11:10
Show Gist options
  • Save DevoKun/ad0410e07cc206133392a87b6d1f409c to your computer and use it in GitHub Desktop.
Save DevoKun/ad0410e07cc206133392a87b6d1f409c to your computer and use it in GitHub Desktop.

Revisions

  1. DevoKun created this gist May 7, 2019.
    23 changes: 23 additions & 0 deletions terraform_logging.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    Terraform Logging
    =================

    Terraform Logging is configured using the `TF_LOG` environment variable.

    ## Valid logs levels

    **DEBUG**, **INFO**, **WARN**, **ERROR**, **TRACE**

    ## Enable the logs

    ```bash
    export TF_LOG="DEBUG"

    terraform init
    terraform plan
    ```

    ## Log to a file

    ```bash
    export TF_LOG_PATH="terraform.log"
    ```