iacMedium
Fix: Pulumi Stack Locked — Concurrent Update Conflict
pulumi up fails with 'the stack is currently locked'
!Symptoms
- pulumi up fails with 'the stack is currently locked'
- Cannot run any Pulumi operations on the stack
- Lock was left from a previously cancelled or crashed operation
- CI/CD pipeline stuck waiting for lock release
?Root Causes
- Previous `pulumi up` was cancelled or crashed without releasing the lock
- Another CI/CD pipeline or developer running `pulumi up` concurrently
- Network disconnection during a Pulumi operation left the lock active
- Pulumi backend (S3, GCS, Azure Blob) has stale lock file
- Two branches deploying to the same stack simultaneously
#Diagnosis Steps
- 1Check who holds the lock: `pulumi stack --show-urls` or check backend directly
- 2For self-managed backend (S3): check `.pulumi/locks/` in the state bucket
- 3Check CI/CD pipelines for concurrent runs targeting the same stack
- 4Check if a team member is running `pulumi up` locally
- 5Review Pulumi Cloud dashboard for active operations
>Fix
- 1Cancel the stale lock: `pulumi cancel`
- 2For self-managed backend: manually delete the lock file from the bucket
- 3If using Pulumi Cloud: cancel from the web dashboard
- 4Wait for the concurrent operation to finish if it's legitimate
- 5Force unlock as last resort — may corrupt state if another operation is truly active
*Prevention
- Use CI/CD concurrency controls to prevent parallel deploys to the same stack
- Set up pipeline locking (GitHub Actions concurrency groups, GitLab resource_group)
- Use short-lived locks with automatic expiration
- Communicate deployments in team chat before running
- Use separate stacks for each developer's feature branches
Related Error Messages
the stack is currently locked byerror: could not acquire lockconflict: another update is currently in progresslocked by version