docs: Note: state pull upgrades to current version

This commit is contained in:
Alisdair McDiarmid 2021-01-22 10:30:01 -05:00
parent bd6b97351b
commit 75d38b50b1
2 changed files with 12 additions and 3 deletions

View File

@ -70,9 +70,13 @@ func (c *StatePullCommand) Help() string {
helpText := `
Usage: terraform state pull [options]
Pull the state from its location and output it to stdout.
Pull the state from its location, upgrade the local copy, and output it
to stdout.
This command "pulls" the current state and outputs it to stdout.
As part of this process, Terraform will upgrade the state format of the
local copy to the current version.
The primary use of this is for state stored remotely. This command
will still work with local state but is less useful for this.

View File

@ -16,9 +16,14 @@ works with local state.
Usage: `terraform state pull`
This command will download the state from its current location and
output the raw format to stdout.
This command will download the state from its current location, upgrade the
local copy to the latest state file version, and output the raw format to
stdout.
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.
~> 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.