@@ -14,26 +14,38 @@ into strings. These interpolations are wrapped in `${}`, such as
1414The interpolation syntax is powerful and allows you to reference
1515variables, attributes of resources, call functions, etc.
1616
17- To reference variables, use the ` var. ` prefix followed by the
17+ ## Available Variables
18+
19+ ** To reference user variables** , use the ` var. ` prefix followed by the
1820variable name. For example, ` ${var.foo} ` will interpolate the
1921` foo ` variable value. If the variable is a mapping, then you
2022can reference static keys in the map with the syntax
2123` var.MAP.KEY ` . For example, ` ${var.amis.us-east-1} ` would
2224get the value of the ` us-east-1 ` key within the ` amis ` variable
2325that is a mapping.
2426
25- To reference attributes of other resources, the syntax is
27+ ** To reference attributes of other resources** , the syntax is
2628` TYPE.NAME.ATTRIBUTE ` . For example, ` ${aws_instance.web.id} `
2729will interpolate the ID attribute from the "aws\_ instance"
2830resource named "web".
2931
30- Finally, Terraform ships with built-in functions. Functions
31- are called with the syntax ` name(arg, arg2, ...) ` . For example,
32- to read a file: ` ${file("path.txt")} ` . The built-in functions
33- are documented below.
32+ ** To reference outputs from a module** , the syntax is
33+ ` MODULE.NAME.OUTPUT ` . For example ` ${module.foo.bar} ` will
34+ interpolate the "bar" output from the "foo"
35+ [ module] ( /docs/modules/index.html ) .
36+
37+ ** To reference count information** , the syntax is ` count.FIELD ` .
38+ For example, ` ${count.index} ` will interpolate the current index
39+ in a multi-count resource. For more information on count, see the
40+ resource configuration page.
3441
3542## Built-in Functions
3643
44+ Terraform ships with built-in functions. Functions are called with
45+ the syntax ` name(arg, arg2, ...) ` . For example,
46+ to read a file: ` ${file("path.txt")} ` . The built-in functions
47+ are documented below.
48+
3749The supported built-in functions are:
3850
3951 * ` concat(args...) ` - Concatenates the values of multiple arguments into
0 commit comments