Document that data sources support meta parameters such as count (#14143)

Also fix the bad interpolation in the subnet_ids example.
This commit is contained in:
Tom Elliff 2017-05-02 15:05:50 +01:00 committed by Radek Simko
parent a6b0c67d54
commit 64cd64d061
2 changed files with 5 additions and 1 deletions

View File

@ -74,6 +74,10 @@ resource "aws_instance" "web" {
}
```
### Meta-parameters
As data sources are essentially a read only subset of resources they also support the same [meta-parameters](https://www.terraform.io/docs/configuration/resources.html#meta-parameters) of resources except for the [`lifecycle` configuration block](https://www.terraform.io/docs/configuration/resources.html#lifecycle).
## Multiple Provider Instances
Similarly to [resources](/docs/configuration/resources.html), the

View File

@ -23,7 +23,7 @@ data "aws_subnet_ids" "example" {
data "aws_subnet" "example" {
count = "${length(data.aws_subnet_ids.example.ids)}"
id = "${aws_subnet_ids.example.ids[count.index]}"
id = "${data.aws_subnet_ids.example.ids[count.index]}"
}
output "subnet_cidr_blocks" {