Added example of variable reference inside file (#11097)

This tripped me up earlier as I was referencing inside the file as $${variable} when it should be ${variable}. Think is brings clarity, cheers.
This commit is contained in:
Abdul Rehman 2017-01-09 08:36:16 +00:00 committed by Paul Stack
parent c52b2cb8ad
commit ec7182148a
1 changed files with 12 additions and 2 deletions

View File

@ -12,7 +12,9 @@ Renders a template from a file.
## Example Usage ## Example Usage
From a file: Option 1: From a file:
Reference the template path:
``` ```
data "template_file" "init" { data "template_file" "init" {
@ -24,7 +26,15 @@ data "template_file" "init" {
} }
``` ```
Inline: Inside the file, reference the variable as such:
```
#!/bin/bash
echo "CONSUL_ADDRESS = ${consul_address}" > /tmp/iplist
```
Option 2: Inline:
``` ```
data "template_file" "init" { data "template_file" "init" {