Trying to spin up a batch of queues from a YAML file using the Genesys Cloud Terraform provider. I’ve got the data source pulling the YAML into a map, which looks clean enough:
locals {
queue_config = yamldecode(file("queues.yaml"))
}
Then I’m iterating with for_each:
resource "genesyscloud_routing_queue" "this" {
for_each = local.queue_config
name = each.value.name
}
The YAML keys are unique, but Terraform keeps throwing a conflict error saying the queue name already exists, even though I’m running terraform apply for the first time on a fresh org. The error points to the name field. I suspect the provider might be caching or the validation is happening before the unique ID generation kicks in.
I’ve tried adding a description field with a timestamp to force uniqueness, but that feels hacky. Is there a way to force the provider to use the YAML key as the ID or bypass the name check? The debug logs just show the 409 Conflict response from the API without much detail on why it thinks the name is taken. Running v1.50.0 of the provider.