From a7b8a54a83cf59beb99d77aa1f17fc384485c906 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Fri, 19 Feb 2016 09:56:55 -0600 Subject: [PATCH] website: clarify `file()` base location refs #5213 --- website/source/docs/configuration/interpolation.html.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/source/docs/configuration/interpolation.html.md b/website/source/docs/configuration/interpolation.html.md index a5b5fd909..465801055 100644 --- a/website/source/docs/configuration/interpolation.html.md +++ b/website/source/docs/configuration/interpolation.html.md @@ -129,7 +129,11 @@ The supported built-in functions are: * `file(path)` - Reads the contents of a file into the string. Variables in this file are _not_ interpolated. The contents of the file are - read as-is. + read as-is. The `path` is interpreted relative to the working directory. + [Path variables](#path-variables) can be used to reference paths relative + to other base locations. For example, when using `file()` from inside a + module, you generally want to make the path relative to the module base, + like this: `file("${path.module}/file")`. * `format(format, args...)` - Formats a string according to the given format. The syntax for the format is standard `sprintf` syntax.