terrafomo
terrafomo copied to clipboard
Reference as a list
I need to reference a data source which has a list. When I have the following code:
AWS.BatchComputeEnvironmentComputeResources
{ subnets = view #ids subnets
}
I get:
subnets = "${data.aws_subnet_ids.d.ids}"
But Terraform actually needs weird syntax like:
subnets = [
"${data.aws_subnet_ids.d.ids}",
]
Don't believe Terraform's documentation on how to reference a variable as a list. It's wrong https://github.com/hashicorp/terraform/issues/13869