I’m running terraform plan to check for changes in our Genesys Cloud routing queues, but it keeps hanging and then failing with a state lock error. I haven’t touched the infrastructure recently, so I’m confused why it thinks there is a lock or drift.
Here is the resource I’m trying to manage:
resource "genesyscloud_routing_queue" "wfm_adherence_queue" {
name = "WFM Adherence Check"
description = "Queue for tracking agent adherence"
enabled = true
}
The error output looks like this:
Error: Error acquiring the state lock
Reason: There is already a lock on this state file.
Lock Info:
ID: abc123-def456
Path: genesyscloud_routing_queue.wfm_adherence_queue
Operation: OperationTypeRead
Who: user@example.com
Version: 1.0.0
Created: 2023-10-27 14:30:00.000 +0000 UTC
Info:
I checked the Genesys Cloud admin console and don’t see any active deployments or imports that would block this. I tried running terraform force-unlock with the ID from the error, but it says the lock ID doesn’t exist.
Is there a way to manually clear this lock via the API? I tried calling /api/v2/terraform/state/locks but got a 404. Not sure what the correct endpoint is or if I’m missing something obvious in my HCL. The queue itself is small and simple, so I don’t expect complex dependencies.