Trace a plan with TF_LOG

Write provider and API debug logs to a file; TRACE is 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 the changes and save the plan to a file, so CI applies exactly this plan

  • terraform apply plan.tfplan

    Apply exactly the plan you generated before, without interactive prompts

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

    Put a resource that already exists under Terraform control

  • terraform state show module.path.resource_type.name

    Show the state attributes of one resource

  • terraform state mv old.address new.address

    Rename or move a resource without destroying and recreating it

all 43 terraform commands