Hitting a weird error when trying to create multiple queues using for_each and a YAML variable file. The plan crashes with a type mismatch error, even though the map looks correct in the debug output.
Error: Incorrect attribute value type
on queues.tf line 12, in resource "genesyscloud_routing_queue" "queue":
12: name = var.queues[each.key].name
Inappropriate value for attribute "name": string required.
Here’s the relevant snippet:
resource "genesyscloud_routing_queue" "queue" {
for_each = var.queues
name = each.value.name
}
Anyone seen this before?