github.com/pmcatominey/terraform@v0.7.0-rc2.0.20160708105029-1401a52a5cc5/website/source/docs/configuration/outputs.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Configuring Outputs"
     4  sidebar_current: "docs-config-outputs"
     5  description: |-
     6    Outputs define values that will be highlighted to the user when Terraform applies, and can be queried easily using the output command. Output usage is covered in more detail in the getting started guide. This page covers configuration syntax for outputs.
     7  ---
     8  
     9  # Output Configuration
    10  
    11  Outputs define values that will be highlighted to the user
    12  when Terraform applies, and can be queried easily using the
    13  [output command](/docs/commands/output.html). Output usage
    14  is covered in more detail in the
    15  [getting started guide](/intro/getting-started/outputs.html).
    16  This page covers configuration syntax for outputs.
    17  
    18  Terraform knows a lot about the infrastructure it manages.
    19  Most resources have a handful or even a dozen or more attributes
    20  associated with it. Outputs are a way to easily extract
    21  information.
    22  
    23  This page assumes you're familiar with the
    24  [configuration syntax](/docs/configuration/syntax.html)
    25  already.
    26  
    27  ## Example
    28  
    29  An output configuration looks like the following:
    30  
    31  ```
    32  output "address" {
    33  	value = "${aws_instance.web.public_dns}"
    34  }
    35  ```
    36  
    37  ## Description
    38  
    39  The `output` block configures a single output variable. Multiple
    40  output variables can be configured with multiple output blocks.
    41  The `NAME` given to the output block is the name used to reference
    42  the output variable.
    43  
    44  Within the block (the `{ }`) is configuration for the output.
    45  These are the parameters that can be set:
    46  
    47    * `value` (required, string) - The value of the output. This must
    48      be a string. This usually includes an interpolation since outputs
    49      that are static aren't usually useful.
    50  
    51  ## Syntax
    52  
    53  The full syntax is:
    54  
    55  ```
    56  output NAME {
    57  	value = VALUE
    58  }
    59  ```
    60  
    61  ## Sensitive Outputs
    62  
    63  Outputs can be marked as containing sensitive material by setting the
    64  `sensitive` attribute to `true`, like this:
    65  
    66  ```
    67  output "sensitive" {
    68      sensitive = true
    69      value = VALUE 
    70  }
    71  ```
    72  
    73  When outputs are displayed on-screen following a `terraform apply` or
    74  `terraform refresh`, sensitive outputs are redacted, with `<sensitive>`
    75  displayed in place of their value.
    76  
    77  ### Limitations of Sensitive Outputs
    78  
    79  * The values of sensitive outputs are still stored in the Terraform
    80    state, and available using the `terraform output` command, so cannot be
    81    relied on as a sole means of protecting values.
    82  * Sensitivity is not tracked internally, so if the output is interpolated in
    83    another module into a resource, the value will be displayed.