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. +<a id="path-variables"></a> + **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.