github.com/jrasell/terraform@v0.6.17-0.20160523115548-2652f5232949/website/source/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  
    34  ## Example: Show a Resource
    35  
    36  The example below shows a resource:
    37  
    38  ```
    39  $ terraform state show module.foo.packet_device.worker[0]
    40  id                = 6015bg2b-b8c4-4925-aad2-f0671d5d3b13
    41  billing_cycle     = hourly
    42  created           = 2015-12-17T00:06:56Z
    43  facility          = ewr1
    44  hostname          = prod-xyz01
    45  locked            = false
    46  ...
    47  ```