Refresh-only plan (detect drift) terraform
Sync state to real infra without proposing changes; surfaces out-of-band drift
terraform plan -refresh-only
more terraform
all 43 commands →
Migrate backend on init
terraform init -migrate-state -backend-config=backend.hcl
Query outputs with jq
terraform output -json | jq -r '.endpoints.value[]'
Trace plan with TF_LOG
TF_LOG=DEBUG TF_LOG_PATH=tf.log terraform plan
Plan with var file
terraform plan -var-file=prod.tfvars -out=plan.tfplan
Apply a saved plan
terraform apply plan.tfplan