2017-02-15 22:14:32 +01:00
|
|
|
---
|
2021-12-15 03:41:17 +01:00
|
|
|
page_title: 'Command: state pull'
|
|
|
|
description: >-
|
|
|
|
The `terraform state pull` command is used to manually download and output the
|
|
|
|
state from remote state.
|
2017-02-15 22:14:32 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# Command: state pull
|
|
|
|
|
|
|
|
The `terraform state pull` command is used to manually download and output
|
2021-12-15 03:41:17 +01:00
|
|
|
the state from [remote state](/language/state/remote). This command also
|
2017-02-15 22:14:32 +01:00
|
|
|
works with local state.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `terraform state pull`
|
|
|
|
|
2021-01-22 16:30:01 +01:00
|
|
|
This command will download the state from its current location, upgrade the
|
2021-03-26 21:57:44 +01:00
|
|
|
local copy to the latest state file version that is compatible with
|
|
|
|
locally-installed Terraform, and output the raw format to stdout.
|
2017-02-15 22:14:32 +01:00
|
|
|
|
|
|
|
This is useful for reading values out of state (potentially pairing this
|
|
|
|
command with something like [jq](https://stedolan.github.io/jq/)). It is
|
|
|
|
also useful if you need to make manual modifications to state.
|
2021-01-22 16:30:01 +01:00
|
|
|
|
|
|
|
~> Note: This command cannot be used to inspect the Terraform version of
|
|
|
|
the remote state, as it will always be converted to the current Terraform
|
|
|
|
version before output.
|