mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-03 05:01:30 -05:00
Signed-off-by: Christian Mesh <christianmesh1@gmail.com> Signed-off-by: ollevche <ollevche@gmail.com> Co-authored-by: ollevche <ollevche@gmail.com>
53 lines
2.2 KiB
Plaintext
53 lines
2.2 KiB
Plaintext
---
|
|
description: >-
|
|
The tofu force-unlock command unlocks the state for a configuration. It
|
|
does not modify your infrastructure.
|
|
---
|
|
|
|
# Command: force-unlock
|
|
|
|
Manually unlock the state for the defined configuration.
|
|
|
|
This will not modify your infrastructure. This command removes the lock on the
|
|
state for the current configuration. The behavior of this lock is dependent
|
|
on the backend being used. Local state files cannot be unlocked by another
|
|
process.
|
|
|
|
## Usage
|
|
|
|
Usage: `tofu force-unlock [options] LOCK_ID`
|
|
|
|
Manually unlock the state for the defined configuration.
|
|
|
|
This will not modify your infrastructure. This command removes the lock on the
|
|
state for the current configuration. The behavior of this lock is dependent
|
|
on the backend being used. Local state files cannot be unlocked by another
|
|
process.
|
|
|
|
:::note
|
|
Use of variables in [backend configuration](../../language/settings/backends/configuration.mdx#variables-and-locals),
|
|
or [encryption block](../../language/state/encryption.mdx#configuration)
|
|
requires [assigning values to root module variables](../../language/values/variables.mdx#assigning-values-to-root-module-variables)
|
|
when running `tofu force-unlock`.
|
|
:::
|
|
|
|
Options:
|
|
|
|
* `-force` - Don't ask for input for unlock confirmation.
|
|
|
|
* `-var 'NAME=VALUE'` - Sets a value for a single
|
|
[input variable](../../language/values/variables.mdx) declared in the
|
|
root module of the configuration. Use this option multiple times to set
|
|
more than one variable. Refer to
|
|
[Input Variables on the Command Line](plan.mdx#input-variables-on-the-command-line) for more information.
|
|
|
|
* `-var-file=FILENAME` - Sets values for potentially many
|
|
[input variables](../../language/values/variables.mdx) declared in the
|
|
root module of the configuration, using definitions from a
|
|
["tfvars" file](../../language/values/variables.mdx#variable-definitions-tfvars-files).
|
|
Use this option multiple times to include values from more than one file.
|
|
|
|
There are several other ways to set values for input variables in the root
|
|
module, aside from the `-var` and `-var-file` options. Refer to
|
|
[Assigning Values to Root Module Variables](../../language/values/variables.mdx#assigning-values-to-root-module-variables) for more information.
|