Predictive Routing Queue Stats 404 on Terraform Apply

Is it possible to fetch real-time predictive routing queue statistics via the Genesys Cloud Terraform provider without hitting a 404 error? The deployment pipeline fails during the validation phase when trying to read queue metrics for predictive routing strategies.

Environment: Genesys Cloud EU1
Tooling: Terraform v1.7.4, Genesys Cloud Provider v1.22.0
Integration: GitHub Actions for nightly WFM data sync
Issue: 404 Not Found when querying for queue observations

The error occurs when the provider attempts to validate the queue configuration against live analytics data. The queue exists in the UI, but the API returns a 404.

  • Verified OAuth scopes include analytics:view and routing:queue:view. The token is valid and works for other endpoints.
  • Checked the queue ID format; it matches the UUID returned by the /api/v2/routing/queues endpoint.

The issue seems specific to predictive routing queues. Standard queues return data correctly. Any insights on whether the provider supports the queue observations query or if a workaround exists?

1 Like

The documentation actually says…

Cause:
Terraform is state management, not a real-time query engine. It cannot consume real-time queue metrics because the Genesys Cloud API does not provide a static HTTP endpoint for live queue status that Terraform can poll; real-time data typically requires event streaming or WebSocket connections, which are outside the scope of Terraform’s execution model.

Solution:
Remove the real-time queue read from the Terraform configuration. Use the genesyscloud_analytics data source for historical metrics only, or build a separate JMeter script to validate queue health post-deploy.