Docs updates for data resources, update expressions ref

This commit is contained in:
Pam Selle 2019-07-26 10:56:56 -04:00
parent e7d8ac5ad7
commit 1b25cb7d4a
2 changed files with 5 additions and 4 deletions

View File

@ -129,10 +129,11 @@ resources.
## Multiple Resource Instances ## Multiple Resource Instances
Data resources support [the `count` meta-argument](./resources.html#count-multiple-resource-instances) Data resources support [`count`](./resources.html#count-multiple-resource-instances-by-count)
as defined for managed resources, with the same syntax and behavior. 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 distinguish the resource itself from the multiple resource _instances_ it
creates. Each instance will separately read from its data source with its creates. Each instance will separately read from its data source with its
own variant of the constraint arguments, producing an indexed result. own variant of the constraint arguments, producing an indexed result.

View File

@ -275,7 +275,7 @@ for use in references, as follows:
`[for k, device in aws_instance.example.device : k => device.size]`. `[for k, device in aws_instance.example.device : k => device.size]`.
When a particular resource has the special 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 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 a single object. In that case, access the attributes of the instances using
either [splat expressions](#splat-expressions) or index syntax: either [splat expressions](#splat-expressions) or index syntax: