github.com/hugorut/terraform@v1.1.3/website/docs/cli/commands/show.mdx (about) 1 --- 2 page_title: 'Command: show' 3 description: >- 4 The `terraform show` command is used to provide human-readable output from a 5 state or plan file. This can be used to inspect a plan to ensure that the 6 planned operations are expected, or to inspect the current state as Terraform 7 sees it. 8 --- 9 10 # Command: show 11 12 The `terraform show` command is used to provide human-readable output 13 from a state or plan file. This can be used to inspect a plan to ensure 14 that the planned operations are expected, or to inspect the current state 15 as Terraform sees it. 16 17 Machine-readable output is generated by adding the `-json` command-line 18 flag. 19 20 -> **Note:** When using the `-json` command-line flag, any sensitive values in 21 Terraform state will be displayed in plain text. For more information, see 22 [Sensitive Data in State](/language/state/sensitive-data). 23 24 ## JSON Output 25 26 For Terraform state files (including when no path is provided), 27 `terraform show -json` will show a JSON representation of the state. 28 29 For Terraform plan files, `terraform show -json` will show a JSON representation 30 of the plan, configuration, and current state. 31 32 If you've updated providers which contain new schema versions since the state 33 was written, the state needs to be upgraded before it can be displayed with 34 `show -json`. If you are viewing a plan, it must be created without 35 `-refresh=false`. If you are viewing a state file, run `terraform refresh` 36 first. 37 38 The output format is covered in detail in [JSON Output Format](/internals/json-format). 39 40 ## Usage 41 42 Usage: `terraform show [options] [file]` 43 44 You may use `show` with a path to either a Terraform state file or plan 45 file. If you don't specify a file path, Terraform will show the latest state 46 snapshot. 47 48 This command accepts the following options: 49 50 * `-no-color` - Disables output with coloring 51 52 * `-json` - Displays machine-readable output from a state or plan file 53 54 -> JSON output via the `-json` option requires **Terraform v0.12 or later**.