Handle a Terraform state lock left after a runner failure.

Instruction: Decide when unlocking is justified and how to avoid concurrent state writers.

Context:

A fictional apply runner disconnected. A second run reports a lock with the first run identifier. The UI for the first runner says offline, but its process status and cloud-operation status are unknown. The backend supports state locking.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

I would stop new applies and establish whether the original operation is still running. An offline UI does not prove the process is dead...

Related Questions