Context:
I am building a Terraform module for our gRPC event microservice. I need to reference an existing queue by name to avoid hardcoding IDs. The API returns 200 OK via Postman, but Terraform fails.
Question:
Could someone explain why this data source returns No matching queue found?
data "genesyscloud_routing_queue" "main" {
name = "Support-Queue-01"
}
Is there a specific naming convention or scope issue preventing the lookup?
data “genesyscloud_routing_queue” “main” {
name = “Support-Queue-01”
division_id = “<your_division_id>”
}
Terraform enforces division isolation. The API returns 200 in Postman because your token has default division context, but the provider requires explicit scope. Add the division_id.
The documentation actually says… you need to include the divisionId explicitly. The provider does not inherit the default context from your Postman session. Try this structure:
Have you tried verifying that the webhook event subscription scope matches your Terraform state? A mismatched conversation:participant:write scope causes silent failures in your Slack Bolt handler. Check your OAuth scope and division_id alignment before deploying.
# Ensure scope matches webhook requirements
data "genesyscloud_routing_queue" "main" {
name = "Support-Queue-01"
division_id = "your-division-id"
}
The documentation actually says… division context isn’t inherited. You’ll get a 404 if division_id is missing. Check the official spec here: https://developer.genesys.cloud/apidocs/routing. I usually verify this in Python first: