Running into a wall with the Genesys Cloud Terraform provider (v1.12.3) when trying to reference existing routing queues by name.
I’ve got a queue called “Support - Tier 2” that definitely exists in the org. I’m trying to get its ID so I can assign users to it in a separate module. Here’s the data source block:
data "genesyscloud_routing_queue" "support_tier2" {
name = "Support - Tier 2"
}
When I run terraform plan, it blows up:
Error: Error reading routing queue: GET https://api.mypurecloud.com/api/v2/routing/queues: 404 Not Found
I’ve checked the API explorer directly with the same token and the queue is right there. The name matches character for character, including the hyphen and the space. Case sensitivity seems to be handled correctly too.
Tried adding a depends_on block pointing to the module that creates the queue, but that didn’t help since the queue is created in a separate run (state import scenario).
Also tried using the genesyscloud_routing_queue resource with import block, but that requires the ID upfront, which defeats the purpose of looking it up by name dynamically.
Is there a known issue with the data source pagination or filtering logic? The queue is on the second page of results if you list all queues, wondering if the data source only checks the first page.
Here’s the full error log snippet:
╷
│ Error: Error reading routing queue: GET https://api.mypurecloud.com/api/v2/routing/queues: 404 Not Found
│
│ with data.genesyscloud_routing_queue.support_tier2,
│ on main.tf line 12, in data "genesyscloud_routing_queue" "support_tier2":
│ 12: data "genesyscloud_routing_queue" "support_tier2" {
│
╵
Any ideas on how to force it to search deeper or if I’m missing a parameter?