Running into a weird issue with the Genesys Cloud Terraform provider. I have a script that updates queue settings nightly. Tonight it failed with a state lock error, but the lock file seems stuck.
Here is the error:
Error: Error acquiring the state lock
Reason: another process has a lock on the state
Lock Info:
ID: abc-123-def
Path: tfstate.lock
Operation: OperationTypeUpdate
Who: user@host
Version: 1.0.0
Created: 2023-10-27 10:00:00 +0000 UTC
Info:
I tried terraform force-unlock abc-123-def but it says the lock ID doesn’t match. The state file is stored in S3 with DynamoDB for locking. The DynamoDB table shows the lock exists, but the process ID is dead.
When I run terraform plan now, it shows massive drift on genesyscloud_routing_queue. It thinks every setting has changed. I checked the API directly using the REST proxy in a to verify the actual config. The values match the terraform state before the crash.
Is there a way to clear the lock without losing state? Or do I need to manually edit the state file? I don’t want to break the queue config. The terraform docs mention force-unlock but it’s not working. Any ideas?