From 2cea7c7d0ccf1c742fb384b7f0047fbe8b54e552 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Fri, 31 Jul 2015 11:44:07 -0500 Subject: [PATCH] docs: clarify template_file path information - change example to use the most commonly necessary path format w/ `path.module` - link to path variable page in description /cc @KFishner --- website/source/docs/configuration/interpolation.html.md | 2 ++ website/source/docs/providers/template/r/file.html.md | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/website/source/docs/configuration/interpolation.html.md b/website/source/docs/configuration/interpolation.html.md index ce2796a9d1..74b946cf16 100644 --- a/website/source/docs/configuration/interpolation.html.md +++ b/website/source/docs/configuration/interpolation.html.md @@ -57,6 +57,8 @@ For example, `${count.index}` will interpolate the current index in a multi-count resource. For more information on count, see the resource configuration page. + + **To reference path information**, the syntax is `path.TYPE`. TYPE can be `cwd`, `module`, or `root`. `cwd` will interpolate the cwd. `module` will interpolate the path to the current module. `root` diff --git a/website/source/docs/providers/template/r/file.html.md b/website/source/docs/providers/template/r/file.html.md index 8fc13823b9..b46e55a80f 100644 --- a/website/source/docs/providers/template/r/file.html.md +++ b/website/source/docs/providers/template/r/file.html.md @@ -14,7 +14,7 @@ Renders a template from a file. ``` resource "template_file" "init" { - filename = "init.tpl" + filename = "${path.module}/init.tpl" vars { consul_address = "${aws_instance.consul.private_ip}" @@ -27,9 +27,9 @@ resource "template_file" "init" { The following arguments are supported: -* `filename` - (Required) The filename for the template. Use path variables - (documented in the interpolation section) to specify what the path is - relative to. +* `filename` - (Required) The filename for the template. Use [path + variables](/docs/configuration/interpolation.html#path-variables) to make + this path relative to different path roots. * `vars` - (Optional) Variables for interpolation within the template.