Trace plan with TF_LOG

Capture provider/API debug to a file; use TRACE for the most verbose level

TF_LOG=DEBUG TF_LOG_PATH=tf.log terraform plan

tool
terraform43 commands
tags
terraformdebugtroubleshooting

More terraform commands

  • terraform plan -var-file=prod.tfvars -out=plan.tfplan

    Show changes; save plan artifact for CI gating

  • terraform apply plan.tfplan

    Apply exactly the previously generated plan — no interactive prompts

  • terraform import module.path.resource_type.name <remote-id>

    Bring an already-existing resource under Terraform control

  • terraform state show module.path.resource_type.name

    Inspect Terraform state attributes for a single resource

  • terraform state mv old.address new.address

    Rename/reorganize resource without destroying and recreating it

all 43 terraform commands