Terraform data source lookup by name fails with 404

Error: resource not found

The genesyscloud_routing_queue data source returns a 404 when querying by name.

data "genesyscloud_routing_queue" "existing" {
 name = "Support Tier 1"
}

The queue exists in Genesys Cloud. Why does the provider fail to resolve this reference?

Have you tried querying by ID instead? The provider’s name lookup can be flaky due to pagination limits or whitespace mismatches. Use the REST API directly to fetch the ID first.

curl -X GET "https://api.mypurecloud.com/api/v2/routing/queues?name=Support+Tier+1&size=1" \
 -H "Authorization: Bearer $TOKEN"

Extract the ID from the response and use it in your data source.

It depends, but generally…
The Java SDK handles pagination automatically, unlike raw curl. If the queue is on page 2, the first request misses it. Use routingApi.getRoutingQueues() with size=100 in your Spring Boot service to fetch the ID reliably. See this guide: https://genesys.com/support/java-sdk-pagination.

Ah, yeah, this is a known issue… The provider searches the first page only, so you must explicitly set size = 100 in the data source block to ensure the queue is found if it is not in the initial 25 results.