Skip to main content
Manually release a stuck Terraform state lock.

Usage

Description

The force-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 use force-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:
  1. Verify no other team members are running Terraform
  2. Check for any stuck CI/CD pipelines
  3. Wait a few minutes for any in-progress operations to complete