terrafomo icon indicating copy to clipboard operation
terrafomo copied to clipboard

Reference as a list

Open puffnfresh opened this issue 6 years ago • 0 comments

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

puffnfresh avatar Oct 26 '18 09:10 puffnfresh