Download the latest state and write it to a local file.
Section: State File Operations
Pull raw state JSON
bash
bash
terraform state pull > terraform.tfstateExplanation
Download the latest state and write it to a local file.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing State File Operations
Push raw state JSON
Upload a local state file into the configured backend.
Import existing object
Associate an existing infrastructure object with a resource address in state.
Plan with alternate state path
Use a non-default local state path for commands that support it.
Remove resource from state
Stop tracking a resource without destroying the remote object.