terraform/website/docs/commands/show.html.markdown

45 lines
1.6 KiB
Markdown
Raw Normal View History

2014-07-24 18:02:10 +02:00
---
layout: "docs"
page_title: "Command: show"
sidebar_current: "docs-commands-show"
2014-10-22 05:21:56 +02:00
description: |-
The `terraform show` command is used to provide human-readable output from a state or plan file. This can be used to inspect a plan to ensure that the planned operations are expected, or to inspect the current state as Terraform sees it.
2014-07-24 18:02:10 +02:00
---
# Command: show
The `terraform show` command is used to provide human-readable output
from a state or plan file. This can be used to inspect a plan to ensure
that the planned operations are expected, or to inspect the current state
as Terraform sees it.
2014-07-24 18:02:10 +02:00
Machine-readable output is generated by adding the `-json` command-line
2019-02-21 02:14:12 +01:00
flag.
2019-02-21 02:14:12 +01:00
-> **Note:** When using the `-json` command-line flag, any sensitive values in
Terraform state will be displayed in plain text. For more information, see
[Sensitive Data in State](/docs/state/sensitive-data.html).
2019-02-21 02:14:12 +01:00
## JSON Output
2019-02-21 02:14:12 +01:00
For Terraform state files (including when no path is provided),
`terraform show -json` will show a JSON representation of the state.
2019-02-21 02:14:12 +01:00
For Terraform plan files, `terraform show -json` will show a JSON representation
of the plan, configuration, and current state.
2019-02-21 02:14:12 +01:00
The output format is covered in detail in [JSON Format](/docs/internals/json-format.html).
2014-07-24 18:02:10 +02:00
## Usage
Usage: `terraform show [options] [path]`
2014-07-24 18:02:10 +02:00
2016-05-20 10:07:17 +02:00
You may use `show` with a path to either a Terraform state file or plan
file. If no path is specified, the current state will be shown.
2014-07-24 18:02:10 +02:00
The command-line flags are all optional. The list of available flags are:
* `-no-color` - Disables output with coloring
* `-json` - Displays machine-readable output from a state or plan file