github.com/loicalbertin/terraform@v0.6.15-0.20170626182346-8e2583055467/website/docs/commands/state/show.html.md (about)

     1  ---
     2  layout: "commands-state"
     3  page_title: "Command: state show"
     4  sidebar_current: "docs-state-sub-show"
     5  description: |-
     6    The `terraform state show` command is used to show the attributes of a single resource in the Terraform state.
     7  ---
     8  
     9  # Command: state show
    10  
    11  The `terraform state show` command is used to show the attributes of a
    12  single resource in the
    13  [Terraform state](/docs/state/index.html).
    14  
    15  ## Usage
    16  
    17  Usage: `terraform state show [options] ADDRESS`
    18  
    19  The command will show the attributes of a single resource in the
    20  state file that matches the given address.
    21  
    22  The attributes are listed in alphabetical order (with the except of "id"
    23  which is always at the top). They are outputted in a way that is easy
    24  to parse on the command-line.
    25  
    26  This command requires a address that points to a single resource in the
    27  state. Addresses are
    28  in [resource addressing format](/docs/commands/state/addressing.html).
    29  
    30  The command-line flags are all optional. The list of available flags are:
    31  
    32  * `-state=path` - Path to the state file. Defaults to "terraform.tfstate".
    33    Ignored when [remote state](/docs/state/remote.html) is used.
    34  
    35  ## Example: Show a Resource
    36  
    37  The example below shows a resource:
    38  
    39  ```
    40  $ terraform state show module.foo.packet_device.worker[0]
    41  id                = 6015bg2b-b8c4-4925-aad2-f0671d5d3b13
    42  billing_cycle     = hourly
    43  created           = 2015-12-17T00:06:56Z
    44  facility          = ewr1
    45  hostname          = prod-xyz01
    46  locked            = false
    47  ...
    48  ```