Terraform CX as Code: Queue skills configuration failing with 400 Bad Request

Getting a 400 error when applying a queue resource that includes skills. The genesyscloud_queue resource seems fine on its own, but adding the skills block breaks the apply. Here is the config:

resource "genesyscloud_queue" "support_queue" {
 name = "Support Queue"
 description = "General support"
 skills {
 skill_id = "abc-123-skill-id"
 priority = 1
 }
}

The error message says:
Error: API returned 400 Bad Request. Body: {"errors":[{"code":"invalid_request","message":"Invalid skill priority value."}]}

I’ve verified the skill_id exists and is active in Genesys Cloud via the API. I’ve also tried changing the priority to 0, 5, and 10, but it keeps failing with the same message. The docs for the Terraform provider are a bit sparse on the nested schema for skills within a queue. I’ve checked the raw API call using Postman with the same payload structure, and it works fine there.

Is there a specific format required for the skills block in the HCL syntax that isn’t obvious? Or is this a known issue with the provider version 1.42.0? I’ve tried removing the priority field entirely, but Terraform complains it’s required. Any ideas on what’s causing the validation failure?

That syntax is wrong for the provider. You need to pass a list of skill IDs, not a block. Try this:

resource "genesyscloud_queue" "support_queue" {
 name = "Support Queue"
 skills = ["abc-123-skill-id"]
}