I’m trying to instrument our Genesys Cloud queue provisioning pipeline with OpenTelemetry. The goal is to capture the Terraform execution trace and link it to the specific genesyscloud_routing_queue resources being created.
Here’s the issue. When I define skills inside the genesyscloud_routing_queue block in my Terraform module, the CX as Code provider throws a validation error on apply. It seems the provider doesn’t like the nested skill block structure I’m using, or maybe I’m missing a reference ID.
resource "genesyscloud_routing_queue" "support_queue" {
name = "Support Queue - OTel Test"
description = "Queue for tracing validation"
# This part is failing
skills {
skill_id = genesyscloud_routing_skill.general_skill.id
level = 5
}
wrap_up_code = genesyscloud_routing_wrapupcode.default_code.wrap_up_code
}
The error message is:
Error: expected skills.0.skill_id to be a string, got number
Wait, that doesn’t make sense. skill_id is definitely a string UUID. I checked the output of the genesyscloud_routing_skill resource. It looks valid.
Is there a specific way the CX as Code provider expects skills to be defined? I’ve been looking at the Terraform registry docs, but they don’t show a clear example of injecting skills with dynamic IDs while maintaining traceability. I need to ensure the skill_id is resolved before the queue resource is applied so my OTel span can capture the dependency graph correctly.
Also, I’m running this in Asia/Manila timezone, so any rate limiting issues might be affecting the state refresh. But the error seems structural.
Anyone else hit this with the CX as Code provider? I’m using version 1.2.4 of the provider.
Here’s the relevant part of my terraform plan output showing the skill ID is correct:
+ resource "genesyscloud_routing_skill" "general_skill" {
+ id = (known after apply)
+ name = "General Support"
}
The UUID is generated correctly. Why does the provider think it’s a number? I’ve tried casting it to string explicitly but that breaks the plan phase entirely.
I’ve also tried using a local variable to hold the skill ID, but same result. The validation error persists.
Is there a workaround or a specific syntax I’m missing for the skills block? I need to get this working to complete the trace context injection for our deployment pipeline.
I can share the full HCL file if needed, but it’s pretty standard. Just the skills block is causing the headache.
Any ideas?