github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/cli/commands/show.html.md (about)

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