I am currently refactoring our infrastructure-as-code pipeline to standardize the provisioning of Genesys Cloud queues. The specific requirement is to ensure that every queue is automatically assigned a predefined set of skills upon creation, rather than relying on manual configuration in the UI. I am using the genesyscloud provider version 1.65.0.
The issue arises when I attempt to define the skills attribute within the genesyscloud_routing_queue resource. According to the documentation, this should be a list of skill IDs. However, after the initial terraform apply succeeds, subsequent runs report a state drift. The plan shows that Terraform wants to remove the skills I just added, even though they are clearly assigned in the Genesys Cloud console and returned by the API.
Here is the resource definition I am using:
resource "genesyscloud_routing_queue" "support_queue" {
name = "Support Team A"
description = "Primary support queue"
skills = [
"1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
"7p8o9n0m-4l3k-2j1i-0h9g-8f7e6d5c4b3a"
]
}
When I run terraform plan, the output indicates:
# genesyscloud_routing_queue.support_queue will be updated in-place
~ resource "genesyscloud_routing_queue" "support_queue" {
~ skills = [
- "1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
- "7p8o9n0m-4l3k-2j1i-0h9g-8f7e6d5c4b3a"
]
}
I have verified that the skill IDs are correct and active. I also tried fetching the skills using the genesyscloud_routing_skill data source to ensure the IDs are dynamic, but the drift persists. It seems like the provider is not correctly reading the skills back from the API response during the refresh step. I am curious if this is a known limitation with the current provider version or if there is a specific syntax required for nested skill assignments that I am missing. The API endpoint /api/v2/routing/queues/{id} returns the skills in the response body, so the data is available. I need a reliable way to manage this via Terraform without manual intervention.