Skip to main content

Command: state pull

The tofu state pull command is used to manually download and output the state from remote state. This command also works with local state.


Usage: tofu state pull

This command downloads the state from its current location, upgrades the local copy to the latest state file version that is compatible with locally-installed OpenTofu, and outputs the raw format to stdout.

This is useful for reading values out of state (potentially pairing this command with something like jq). It is also useful if you need to make manual modifications to state.

You cannot use this command to inspect the OpenTofu version of the remote state, as it will always be converted to the current OpenTofu version before output.