mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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:
parent
a6b0c67d54
commit
64cd64d061
@ -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
|
||||
|
@ -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" {
|
||||
|
Loading…
Reference in New Issue
Block a user