I'm trying to set the Azure Availability Zone(A.A.Z) using the Terraform Element Function but I'm getting the following error twice. Since there are 3 A.A.Z. I'd like to use Element for this as it would work really well, if i could figure out the syntax or where i'm going wrong that is. Element will just keep cycling through the same number set which i want as my module may request 3 servers or 300. Below the code is the error from main.tf: I'm getting the error twice.
zones = "${var.avzones}" ? "${element(["1", "2", "3"], "${count.index + 1}")}" : ""
Error: Incorrect attribute value type
on ..\main.tf line 283, in resource "azurerm_virtual_machine" "vm":
283: zones = "${var.avzones}" ? "${element(["1", "2", "3"], "${count.index + 1}")}" : ""
Inappropriate value for attribute "zones": list of string required.
Any ideas would be greatly appreciated --if i find an answer I'll come back and post--
Cheers, -Sam Kachar