Microsoft Azure CSPM Terraform Debugging

Updated Nov 2, 2023

Enable Terraform debugging

Enable Terraform® debugging to troubleshoot potential issues with your Terraform configuration.


Before you begin


  1. If you do not suspect an existing configuration to be present, run this command in a terminal to configure the log level:
    export TF_LOG="DEBUG"
  2. Run this command to verify the log level:
    echo $TF_LOG
  3. Run this command to configure the log path:
    export TF__LOG_PATH="./example/"
  4. Run this command to verify the logs generated by Terraform:
    terraform apply
  5. Verify that the debug logs are available at the path that you configured.

See also