Trying to spin up a bunch of queues from a YAML file using for_each. The YAML parses fine in HCL, but the provider barfs when a queue name has spaces. I’m using file("queues.yaml") and mapping it, but get a “queue name invalid” error during apply. Is there a clean way to handle this without writing a custom data source? Here’s the snippet:
terraform {
required_providers {
genesyscloud = {}
}
}
variable "queues" {
default = file("queues.yaml")
}
resource "genesyscloud_routing_queue" "q" {
for_each = var.queues
name = each.value.name
}