terraform refresh

Category: IaC & Automation

terraform refresh

Sync the state file with real cloud resources

Re-reads each managed resource from its provider and updates the state file to match reality, without planning or changing infrastructure. Useful after out-of-band changes to reduce drift surprises. Modern Terraform prefers plan -refresh-only to review recorded differences first. Related: terraform plan -refresh-only.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.