`terraform apply` in CI fails with "Error acquiring the state lock: ConditionalCheckFailedException" and shows a lock from a pipeline run that was cancelled two hours ago.
BeginnerTroubleshootingPipeline outages
Answer
Likely causes → A run was killed (cancelled job, runner died, timeout) before Terraform released its lock in the backend, so the lock entry is orphaned.
Diagnose → The error prints the lock ID, who holds it and when. Confirm nothing is actually running: check CI for in-progress jobs on the same workspace and ask in the team channel.
Fix → Only once you're sure no apply is running:
terraform force-unlock <LOCK_ID>
Then run terraform plan to check whether the interrupted apply left partial changes.
Prevent → Serialize Terraform jobs per workspace (concurrency: group in GitHub Actions, disableConcurrentBuilds() in Jenkins), give runs enough timeout, and handle SIGTERM gracefully (Terraform releases the lock on a clean interrupt).
More on Pipeline outages
Every GitHub Actions job in the org sits at "Waiting for a runner to pick up this job..." for 30 minutes.BeginnerJenkins builds on one agent fail with "java.io.IOException: No space left on device" while checking out code.BeginnerA deploy workflow that worked yesterday fails at `aws-actions/configure-aws-credentials` with "Not authorized to perform sts:AssumeRoleWithWebIdentity".IntermediateEvery pipeline in the company fails at the dependency step with "npm ERR! 503 Service Unavailable" (or PyPI/Maven timeouts) because an upstream registry is having an outage.IntermediateArgo CD shows the `payments` app permanently `OutOfSync` and self-heal keeps fighting: replicas jump between 3 and 12 every few minutes.IntermediateAfter GitHub moved `ubuntu-latest` to a new Ubuntu release, 30% of pipelines started failing with missing tools or changed versions.Intermediate