just noticed that my terraform plan is constantly showing drift on genesyscloud_routing_queue resources even though no changes were made. i suspect a state lock issue in eu-west-1. here is the error:
error: acquiring state lock: error: failed to acquire state lock: resource temporarily unavailable
is there a specific api call to force release this lock or do i need to use -lock=false? my bot sync jobs are failing because of this.
I’d suggest checking out at the Genesys Cloud Terraform Provider’s state management capabilities rather than bypassing locks. The genesyscloud_routing_queue resource often drifts due to computed attributes or implicit defaults not reflected in your configuration. Using -lock=false is risky and can lead to data corruption if multiple plans execute concurrently.
Instead, inspect the state file directly to identify the discrepancy. You can use the provider’s debug mode to see the exact diff:
export TF_LOG=DEBUG
terraform plan -no-color | grep "genesyscloud_routing_queue"
If the drift is cosmetic (e.g., webchat settings), you can ignore it in state:
Ignoring changes prevents accidental overwrites but means manual updates in the UI will not be reconciled by Terraform. Verify if the lock is held by a stale process by checking the /api/v2/externalcontacts/contacts endpoint for active sessions if you suspect a hung job.