Hey folks,
Running into a snag with the Genesys Cloud Terraform provider. I’m trying to define a queue with specific skills using the genesyscloud_routing_queue resource, but every time I run terraform apply, it bombs out with a 400 Bad Request. The error message is pretty vague, just saying “Error updating queue: 400 Bad Request” without much detail on what’s actually wrong in the JSON payload.
I’ve got a simple setup. I’m defining the queue and then trying to attach skills to it using the genesyscloud_routing_queue_skills resource. Here’s the snippet I’m using:
resource "genesyscloud_routing_queue" "my_queue" {
name = "Support Queue"
description = "Main support queue"
enabled = true
}
resource "genesyscloud_routing_queue_skills" "my_queue_skills" {
queue_id = genesyscloud_routing_queue.my_queue.id
skill_ids = ["12345678-1234-1234-1234-123456789abc", "87654321-4321-4321-4321-cba987654321"]
}
The skill IDs are definitely valid. I copied them straight from the UI. I’ve also tried defining the skills directly within the genesyscloud_routing_queue resource using the skills block, but that doesn’t seem to be supported in the current version of the provider. The docs are a bit light on examples for this specific use case.
I’m using provider version 2.13.0. I’ve checked the debug logs, and the request payload looks correct. It’s sending a PUT request to /api/v2/routing/queues/{id}/skills. The response body is just {"errors": [{"code": "bad_request", "message": "Invalid request"}]}. No helpful hints.
Has anyone else hit this? Am I missing a dependency between the resources? I tried adding a depends_on attribute, but it didn’t change anything. The queue gets created fine, it’s just the skills assignment that fails.
Any ideas on how to debug this further? I’m stuck.