Running into a wall trying to reference an existing queue by name in Terraform instead of hardcoding the ID. The queue exists in Genesys Cloud, but the genesys_cloud_routing_queue data source keeps failing to find it when the name contains a hyphen. Here’s the config:
terraform {
required_providers {
genesyscloud = {
source = "genesys/genesyscloud"
version = "1.45.0"
}
}
}
data "genesys_cloud_routing_queue" "my_queue" {
name = "Support-Team-Alpha"
}
resource "genesys_cloud_routing_skill" "example" {
name = "TestSkill"
queue_ids = [data.genesys_cloud_routing_queue.my_queue.id]
}
The error is Error: No matching queue found. I’ve double-checked the spelling. It’s exact. Even tried wrapping it in quotes explicitly in case of parsing weirdness. The queue ID is 12345678-1234-1234-1234-123456789012. When I use the ID directly in the resource, it works fine. But the data source lookup by name fails. I suspect the provider might be doing a strict equality check that doesn’t handle the hyphen correctly or maybe it’s case-sensitive in a way the docs don’t mention. The API endpoint /api/v2//queues returns the queue fine with a GET request using the name as a filter. Why does Terraform choke on this? The docs say name lookup is supported. Am I missing a parameter? The goal is to make this portable across environments where IDs change but names stay the same. Right now I’m stuck hardcoding IDs which defeats the purpose of IaC. Any ideas? The error log doesn’t give much more detail than that generic message. I’ve tried adding description as a fallback filter but that didn’t help either. Just want to reference the queue by name and move on. The rest of the deployment works perfectly.