From 1b25cb7d4a289d200a86ec04e7ac2d2c28e1ddbc Mon Sep 17 00:00:00 2001 From: Pam Selle Date: Fri, 26 Jul 2019 10:56:56 -0400 Subject: [PATCH] Docs updates for data resources, update expressions ref --- website/docs/configuration/data-sources.html.md | 7 ++++--- website/docs/configuration/expressions.html.md | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/website/docs/configuration/data-sources.html.md b/website/docs/configuration/data-sources.html.md index 131192122..1121b2167 100644 --- a/website/docs/configuration/data-sources.html.md +++ b/website/docs/configuration/data-sources.html.md @@ -129,10 +129,11 @@ resources. ## Multiple Resource Instances -Data resources support [the `count` meta-argument](./resources.html#count-multiple-resource-instances) -as defined for managed resources, with the same syntax and behavior. +Data resources support [`count`](./resources.html#count-multiple-resource-instances-by-count) +and [`for_each`](./resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings) +meta-arguments as defined for managed resources, with the same syntax and behavior. -As with managed resources, when `count` is present it is important to +As with managed resources, when `count` or `for_each` is present it is important to distinguish the resource itself from the multiple resource _instances_ it creates. Each instance will separately read from its data source with its own variant of the constraint arguments, producing an indexed result. diff --git a/website/docs/configuration/expressions.html.md b/website/docs/configuration/expressions.html.md index 93491e5b5..67eb7ab1c 100644 --- a/website/docs/configuration/expressions.html.md +++ b/website/docs/configuration/expressions.html.md @@ -275,7 +275,7 @@ for use in references, as follows: `[for k, device in aws_instance.example.device : k => device.size]`. When a particular resource has the special -[`count`](https://www.terraform.io/docs/configuration/resources.html#count-multiple-resource-instances) +[`count`](https://www.terraform.io/docs/configuration/resources.html#count-multiple-resource-instances-by-count) argument set, the resource itself becomes a list of instance objects rather than a single object. In that case, access the attributes of the instances using either [splat expressions](#splat-expressions) or index syntax: