Hi,
The aws_emr_cluster resource's ec2_attributes block accepts a subnet_id. I have a subnet per availability zone, and subnet_id accepts only one value.
In order to spin up a cluster in any of my available subnets, I was looking at using:
resource "random_shuffle" "az" {
input = ["private-a", "private-b", "private-c"]
result_count = 1
}
resource "aws_emr_cluster" "cluster" {
...
ec2_attributes {
...
subnet_id = "${random_shuffle.az.result}"
...
}
}
This returns a list, rather than a string, which subnet_id expects. Is there a way to convert a list to a string?
Thanks,
Andrew