Usage
Description
Theforce-unlock command releases a state lock that was not properly released. This can happen when a Terraform operation is interrupted or crashes.
Arguments
Options
Examples
Basic Usage
Specific Stack
Force Without Confirmation
When to Use
You typically need this command when you see an error like:Safety
Only useforce-unlock when you’re certain no other Terraform operations are running. Forcing an unlock while another operation is in progress can corrupt your state.
Before using force-unlock:
- Verify no other team members are running Terraform
- Check for any stuck CI/CD pipelines
- Wait a few minutes for any in-progress operations to complete