docs: Fix map key interpolation documentation

Previously was recommending the now-invalid dot syntax for map keys,
change to using HIL indexing.
This commit is contained in:
James Nugent 2016-08-09 16:03:05 -04:00
parent e4f1d879d9
commit 9fa978a45f
1 changed files with 2 additions and 3 deletions

View File

@ -27,9 +27,8 @@ will be rendered as a literal `${foo}`.
variable name. For example, `${var.foo}` will interpolate the variable name. For example, `${var.foo}` will interpolate the
`foo` variable value. If the variable is a map, then you `foo` variable value. If the variable is a map, then you
can reference static keys in the map with the syntax can reference static keys in the map with the syntax
`var.MAP.KEY`. For example, `${var.amis.us-east-1}` would `var.MAP["KEY"]`. For example, `${var.amis["us-east-1"]` would
get the value of the `us-east-1` key within the `amis` variable get the value of the `us-east-1` key within the `amis` map variable.
that is a map.
**To reference attributes of your own resource**, the syntax is **To reference attributes of your own resource**, the syntax is
`self.ATTRIBUTE`. For example `${self.private_ip_address}` will `self.ATTRIBUTE`. For example `${self.private_ip_address}` will