Skip to content

Commit

Permalink
Merge pull request #30702 from hashicorp/add-powershell-warning
Browse files Browse the repository at this point in the history
Add note about powershell formatting
  • Loading branch information
laurapacilio committed Mar 21, 2022
2 parents b386f76 + 0ba0fe6 commit 20e9d8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions website/docs/cli/commands/state/pull.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ works with local state.

Usage: `terraform state pull`

This command will download the state from its current location, upgrade the
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 Terraform, and output the raw format to stdout.
locally-installed Terraform, and outputs 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
You cannot use this command to inspect the Terraform version of
the remote state, as it will always be converted to the current Terraform
version before output.

-> **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`.
4 changes: 3 additions & 1 deletion website/docs/cli/commands/state/push.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ manual intervention is necessary with the remote state.

Usage: `terraform state push [options] PATH`

This command will push the state specified by PATH to the currently
This command pushes the state specified by PATH to the currently
configured [backend](/language/settings/backends).

If PATH is "-" then the state data to push is read from stdin. This data
is loaded completely into memory and verified prior to being written to
the destination state.

-> **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 push | sc terraform.tfstate`.

Terraform will perform a number of safety checks to prevent you from
making changes that appear to be unsafe:

Expand Down

0 comments on commit 20e9d8e

Please sign in to comment.