Terraform gen_cloud_queue: Cannot attach skills to queue resource

We’ve been trying to standardize our WFM infrastructure using Terraform. The goal is to define queues with specific skills so the routing matches our adherence targets. The queue resource creates fine, but the skills aren’t sticking.

Here is the snippet:

resource "gen_cloud_routing_queue" "wfm_queue" {
 name = "WFM_Support"
 description = "Queue for WFM metrics"
 
 skills {
 name = "WFM_Analytics"
 }
}

When I run terraform apply, it succeeds without errors. But when I check the UI, the skill is missing. If I try to add a skill that doesn’t exist in the system, I get a 404. But WFM_Analytics definitely exists.

I checked the API docs for /api/v2/routing/queues. The POST body expects a skills array of strings (IDs), not objects with names. The Terraform provider seems to be mapping the name to an ID internally, but it’s failing silently or mapping to the wrong one.

Is there a way to pass the skill ID directly in the resource definition? Or do I need to use a data source to look up the ID first? I’ve tried using gen_cloud_routing_skill data source but it requires the exact name match which is tricky with our naming conventions.