Trying to pretty much replicate the TF example for random_shuffle to randomly return value from a list. Usecase is the same where I want to have a difference gcp zone returned for a compute instance.
Error from TF Plan:
Error: Unsupported attribute
on main.tf line 23, in resource "google_compute_instance" "vm_instance":
23: zone = "${random_shuffle.gcp-zones.result}"
|----------------
| random_shuffle.gcp-zones is tuple with 3 elements
This value does not have any attributes.
Seems like it is not processing the result_count option in the random_shuffle resource:
resource "random_shuffle" "gcp-zones" {
input = ["northamerica-northeast1-a", "northamerica-northeast1-b", "northamerica-northeast1-c"]
result_count = 1
}
Thanks!