Terraform state lock blocking drift detection on genesyscloud_routing_queue

Running into a blocking issue with the Genesys Cloud Terraform provider while trying to reconcile some queue settings. We’ve got a standard genesyscloud_routing_queue resource defined in our IaC, but terraform plan is failing to detect any drift even though we’ve manually tweaked some settings in the UI.

The error log shows:

Error: State lock acquisition failed

I’ve checked the S3 bucket and DynamoDB table configured for the backend. The lock ID in DynamoDB is stale, pointing to a runner that died three days ago during a CI pipeline run. I can manually delete the lock entry in DynamoDB, which allows the plan to proceed, but that feels like a band-aid. The real problem is that the plan output shows no changes for the queue, despite the UI clearly showing different wrap-up codes than what’s in our .tf files.

Here’s the resource definition:

resource "genesyscloud_routing_queue" "support_queue" {
 name = "Support-Gen-1"
 description = "General support queue"
 
 skills {
 skill_id = var.skill_id_general
 }
 
 wrapup_codes {
 id = var.wrapup_id_no_issue
 name = "No issue found"
 }
}

We’re using the latest version of the myntra/genesyscloud provider. Is there a known issue with the provider not picking up specific attribute changes on routing_queue? Or is this a caching issue on the Genesys API side? I’ve tried adding depends_on to force a refresh, but that just triggers the lock error again.

Also, is there a way to bypass the state lock safely without risking corruption, or should we be looking at a different locking mechanism? We’re running this in a GitLab CI environment, so parallel runs aren’t really an issue, but the stale lock keeps coming back.

Any insights on why the diff isn’t showing up? I’ve verified the API response for GET /api/v2/routing/queues/{id} and it definitely doesn’t match the state file.