Hey folks,
Running into a weird sync issue with the genesyscloud_queue resource. I’ve got a module that provisions queues and assigns skills, but on the first terraform apply, the queue creates fine but the skills never actually stick. I have to run it a second time for the skills to show up in the UI.
Here’s the snippet I’m using:
resource "genesyscloud_queue" "support_queue" {
name = "Tech Support"
description = "Tier 1 support queue"
skills {
name = "English"
}
skills {
name = "Billing"
}
}
The first apply succeeds with no errors. Terraform reports no changes needed on the second run, but Genesys Cloud shows the skills attached. If I destroy and recreate, it’s the same story. The queue gets created, skills are missing, then a subsequent plan says they need to be added.
I’ve checked the provider version (1.12.3) and the docs say skills are managed in-place. I’m wondering if there’s a race condition where the queue ID isn’t fully propagated before the skills are attempted to be linked? Or is this a known limitation with how the provider handles the skills block?
I’ve tried adding depends_on to a dummy null_resource to force a delay, but that feels like a hack. Anyone else hit this? It’s breaking my CI/CD pipeline since we expect a single apply to be idempotent.
Here’s the relevant part of the debug log from the first apply:
2023-10-27T10:15:00.000Z [DEBUG] POST /api/v2/queues/12345/skills
2023-10-27T10:15:00.123Z [INFO] Response: 201 Created
It returns 201, but the skills aren’t there. Super frustrating.
Appreciate any insights.