Refresh-only plan (detect drift)
Sync state to real infra without proposing changes; surfaces out-of-band drift
terraform plan -refresh-only
- tool
- terraform43 commands
More terraform commands
-
terraform init -migrate-state -backend-config=backend.hclMove state to a new backend; use -reconfigure to skip migration and reset
-
terraform output -json | jq -r '.endpoints.value[]'Pipe machine-readable outputs into jq for scripting and downstream wiring
-
TF_LOG=DEBUG TF_LOG_PATH=tf.log terraform planCapture provider/API debug to a file; use TRACE for the most verbose level
-
terraform plan -var-file=prod.tfvars -out=plan.tfplanShow changes; save plan artifact for CI gating
-
terraform apply plan.tfplanApply exactly the previously generated plan — no interactive prompts