github.com/kanishk98/terraform@v1.3.0-dev.0.20220917174235-661ca8088a6a/website/docs/cli/commands/state/pull.mdx (about) 1 --- 2 page_title: 'Command: state pull' 3 description: >- 4 The `terraform state pull` command is used to manually download and output the 5 state from remote state. 6 --- 7 8 # Command: state pull 9 10 The `terraform state pull` command is used to manually download and output 11 the state from [remote state](/language/state/remote). This command also 12 works with local state. 13 14 ## Usage 15 16 Usage: `terraform state pull` 17 18 This command downloads the state from its current location, upgrades the 19 local copy to the latest state file version that is compatible with 20 locally-installed Terraform, and outputs the raw format to stdout. 21 22 This is useful for reading values out of state (potentially pairing this 23 command with something like [jq](https://stedolan.github.io/jq/)). It is 24 also useful if you need to make manual modifications to state. 25 26 You cannot use this command to inspect the Terraform version of 27 the remote state, as it will always be converted to the current Terraform 28 version before output. 29 30 -> **Note:** Terraform state files must be in UTF-8 format without a byte order mark (BOM). For PowerShell on Windows, use `Set-Content` to automatically encode files in UTF-8 format. For example, run `terraform state pull | sc terraform.tfstate`.