#subnet_id = "${var.subnets[count.index]}"
#subnet_id = "${tolist(data.aws_subnet_ids.example.ids)[count.index]}"
#subnet_id = "${data.aws_subnet_ids.selected.ids[count.index]}"
#subnet_id = "${element(data.aws_subnet_ids.selected.ids, count.index)}"
Thanks
Sre
Have you tried:
Subnet_id = “${element(subnet_ids, count.index)}”
You haven’t shared your data.aws_subnet_ids.selected resource definition, but since you are specifying your own list of subnets, the above will rotate through your list of subnets for however many counts you define.
Rob
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
terraform-too...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/terraform-tool/369f977a-7447-485a-8f41-d61dbf592648%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to terrafo...@googlegroups.com.