Why is the Terraform provider hanging on a state lock when I run terraform plan for a simple queue update?
I’ve been managing our CXone instance config with the Nice CXone Terraform provider. It’s usually fine, but now I’m hitting a wall. I just changed the outbound_caller_id on a genesyscloud_routing_queue resource. Nothing fancy. But when I run the plan, it hangs for about 20 seconds and then throws this:
Error: Error acquiring the state lock
Lock Info:
ID: 8f3a9c2e-1b2d-4f5a-9c8e-7d6b5a4f3e2d
Path: tfstate
Operation: OperationTypePlan
Who: my-laptop@192.168.1.5
Version: 1.0
Created: 2023-10-27 14:30:00.000000 +0000 UTC
Info:
"terraform force-unlock" is my only option?
The weird part is no one else is running Terraform. I checked the backend logs. No active runs. I even tried terraform refresh and same thing. The state file seems corrupted or the lock isn’t releasing properly after a failed API call to /api/v2/routing/queues.
Is there a way to debug the lock acquisition without nuking the state file? I’m worried about drift if I force it. The SDK calls seem fine in Postman, so the API isn’t down. Just stuck here.