I’m trying to standardize our Genesys Cloud environment setup using Terraform. I want to reference existing routing queues by name instead of hardcoding IDs, since the IDs change between dev and prod.
I’m using the genesyscloud_routing_queue data source. Here’s the block:
data "genesyscloud_routing_queue" "support_queue" {
name = "General Support"
}
When I run terraform plan, it fails with:
Error: Error reading Routing Queue: 404 Not Found
The queue definitely exists. I can see it in the UI and the API call GET /api/v2/routing/queues?name=General Support returns the correct JSON payload.
Is the data source lookup case-sensitive? Or does it require an exact match including whitespace? I’ve checked the name in the UI and it’s exactly General Support. No trailing spaces.
I also tried using the genesyscloud_routing_queue resource with import but that feels like a hack for a simple reference. I just need the ID to pass to a user role assignment later in the script.
Here’s the full error context from the debug log:
2023-10-27T14:22:01.123+0800 [DEBUG] provider.terraform-provider-genesyscloud: GET /api/v2/routing/queues?name=General Support 404 Not Found
What am I missing? Is there a different data source for this?