Skip to content

force-unlock

Usage

The terraform force-unlock command is a command-line tool that is used to manually unlock the state for the current configuration. Here are some key points about the terraform force-unlock command:

  • The terraform force-unlock LOCK_IDcommand is used to release a lock on the state for the current configuration.
  • It requires a lock ID, which can be obtained from the error message when a lock conflict occurs.
  • This command should only be used in exceptional circumstances, such as when automatic state unlocking fails or when a lock is left in place due to an interrupted Terraform operation.
  • The terraform force-unlock command does not verify if the lock is held by another active operation, so it should be used with caution to avoid potential conflicts.