Terraform CX as Code: Queue skills block syntax error with provider v1.0.12

Terraform apply fails with:

Error: Missing attribute definition

on queues.tf line 12, in resource “genesyscloud_routing_queue” “support_queue”:
12: skills {

The documentation for the genesyscloud_routing_queue resource is thin on the ground regarding the nested skills block structure. I’m trying to define a queue with a specific set of skills and their proficiency levels using the official Genesys Cloud Terraform provider (v1.0.12). The HCL below looks syntactically correct to me, but the parser is choking on the skills block.

resource "genesyscloud_routing_queue" "support_queue" {
 name = "Support Tier 1"
 description = "General support queue"
 
 skills {
 name = "english"
 proficiency = 5
 }
 
 skills {
 name = "technical_support"
 proficiency = 3
 }
}

I’ve checked the API docs for /api/v2//queues and the request body clearly expects a skills array with objects containing id and proficiency, not name. But in Terraform, we can’t pass the skill ID directly because the skill resource creation and queue creation might happen in parallel or the ID isn’t available in the same module scope.

Does the provider expect a lookup helper? Or is there a specific way to reference skill names so the provider resolves the IDs automatically during apply? I tried passing the skill ID directly using a data source lookup, but that introduces a hard dependency that breaks our modular deployment order.

data "genesyscloud_routing_skill" "en_skill" {
 name = "english"
}

Using the data source ID in the skills block results in a different error about type mismatch. The proficiency field is also throwing warnings if I don’t wrap it in a specific sub-block. The provider seems to expect a map or a complex object structure that isn’t documented clearly.

We’ve got a deadline to deploy this environment update and I’m stuck on this syntax. The UI allows me to add skills by name, so there has to be a way to do this in code without hardcoding UUIDs. Just need the correct HCL structure for the skills attribute.

You’re hitting that error because the skills block inside genesyscloud_routing_queue isn’t just a free-form object. The provider expects a specific structure where you map skill IDs to proficiency levels. In v1.0.12, the schema requires you to use the skill_id and proficiency_level attributes explicitly within that block. It’s easy to miss if you’re looking at the raw JSON API payload instead of the HCL docs.

Here’s how you should structure it. Notice the nested object syntax:

resource "genesyscloud_routing_queue" "support_queue" {
 name = "Support Queue"
 description = "Primary support queue"
 enabled = true

 # This is the tricky part
 skills {
 skill_id = "12345678-1234-1234-1234-123456789abc" # Your actual skill UUID
 proficiency_level = "ADVANCED"
 }
 
 # Add more blocks for additional skills
 skills {
 skill_id = "87654321-4321-4321-4321-cba987654321"
 proficiency_level = "INTERMEDIATE"
 }
}

If you’re managing skills dynamically (which you probably are in a multi-tenant setup), hardcoding UUIDs is a nightmare. You’ll want to reference the genesyscloud_routing_skill resource IDs instead. Like this:

resource "genesyscloud_routing_queue" "support_queue" {
 name = "Support Queue"
 
 skills {
 skill_id = genesyscloud_routing_skill.tech_support.id
 proficiency_level = "ADVANCED"
 }
}

Also, double-check that the skill you’re referencing actually exists in the same division. If there’s a division mismatch, the apply will fail later, but the syntax error you’re seeing right now is purely about the missing attribute definitions. The provider is strict about that block structure. Don’t forget to run terraform fmt after updating the file, indentation matters more than you’d think with nested blocks.