github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/website/source/docs/commands/output.html.markdown (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Command: output"
     4  sidebar_current: "docs-commands-output"
     5  description: |-
     6    The `terraform output` command is used to extract the value of an output variable from the state file.
     7  ---
     8  
     9  # Command: output
    10  
    11  The `terraform output` command is used to extract the value of
    12  an output variable from the state file.
    13  
    14  ## Usage
    15  
    16  Usage: `terraform output [options] NAME`
    17  
    18  By default, `output` requires only a variable name and looks in the
    19  current directory for the state file to query.
    20  
    21  The command-line flags are all optional. The list of available flags are:
    22  
    23  * `-state=path` - Path to the state file. Defaults to "terraform.tfstate".
    24  * `-module=module_name` - The module path which has needed output.
    25      By default this is the root path. Other modules can be specified by
    26      a period-separated list. Example: "foo" would reference the module
    27      "foo" but "foo.bar" would reference the "bar" module in the "foo"
    28      module.