github.com/paulmey/terraform@v0.5.2-0.20150519145237-046e9b4c884d/website/source/docs/providers/template/r/file.html.md (about)

     1  ---
     2  layout: "template"
     3  page_title: "Template: template_file"
     4  sidebar_current: "docs-template-resource-file"
     5  description: |-
     6    Renders a template from a file.
     7  ---
     8  
     9  # template\_file
    10  
    11  Renders a template from a file.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "template_file" "init" {
    17      filename = "init.tpl"
    18  
    19      vars {
    20          consul_address = "${aws_instance.consul.private_ip}"
    21      }
    22  }
    23  
    24  ```
    25  
    26  ## Argument Reference
    27  
    28  The following arguments are supported:
    29  
    30  * `filename` - (Required) The filename for the template. Use path variables
    31      (documented in the interpolation section) to specify what the path is
    32      relative to.
    33  
    34  * `vars` - (Optional) Variables for interpolation within the template.
    35  
    36  ## Attributes Reference
    37  
    38  The following attributes are exported:
    39  
    40  * `filename` - See Argument Reference above.
    41  * `vars` - See Argument Reference above.
    42  * `rendered` - The final rendered template.
    43