I’m trying to define a Genesys Cloud queue with specific skills using the CX as Code Terraform provider (genesyscloud). The documentation suggests using the genesyscloud_routing_queue resource with a skill block, but I’m hitting a wall.
Here’s the relevant snippet from my main.tf:
resource "genesyscloud_routing_queue" "support_queue" {
name = "Tier 1 Support"
description = "General support queue"
enabled = true
skill {
name = "billing"
level = 100
}
skill {
name = "technical"
level = 80
}
}
When I run terraform plan, it looks fine. But during terraform apply, it throws a 400 Bad Request. The error message is:
Error: POST /api/v2/routing/queues: 400 Bad Request
Response: {"errors":[{"code":"bad_request","message":"Invalid skill configuration"}]}
I’ve verified that the skills “billing” and “technical” exist in the Genesys Cloud instance and are in the same division. I’ve also tried referencing them by ID instead of name, using a genesyscloud_routing_skill data source to fetch the ID first, like this:
data "genesyscloud_routing_skill" "billing_skill" {
name = "billing"
}
resource "genesyscloud_routing_queue" "support_queue" {
# ... other config ...
skill {
id = data.genesyscloud_routing_skill.billing_skill.id
level = 100
}
}
Same error. I’m using provider version 1.50.0. Is there a specific format required for the skill block that isn’t obvious from the docs? Or is this a known issue with the provider where it doesn’t handle skill assignments correctly on queue creation?
I can create the queue manually in the UI and add skills there without issue, so it’s not a permissions problem. Just the Terraform provider acting up. Anyone else run into this?