diff --git a/CHANGELOG.md b/CHANGELOG.md index b66344c6a..eb3e64ea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ FEATURES: no more local caching of remote state, and more. [GH-11286] * **Destroy Provisioners:** Provisioners can now be configured to run on resource destruction. [GH-11329] + * **State Locking:** State will be autuomatically locked when supported by the backend. + Backends supporting locking in this releae are; Local, S3 (via DynamoDB), Consul. [GH-11187] IMPROVEMENTS: diff --git a/website/source/docs/commands/force-unlock.html.markdown b/website/source/docs/commands/force-unlock.html.markdown new file mode 100644 index 000000000..2cee20552 --- /dev/null +++ b/website/source/docs/commands/force-unlock.html.markdown @@ -0,0 +1,31 @@ +--- +layout: "docs" +page_title: "Command: force-unlock" +sidebar_current: "docs-commands-force-unlock" +description: |- + The `terraform force-unlock` manually unlocks the Terraform state +--- + +# 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: terraform force-unlock [DIR] + +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. + +Options: + +* `-force` - Don't ask for input for unlock confirmation. diff --git a/website/source/docs/commands/index.html.markdown b/website/source/docs/commands/index.html.markdown index b7f0c1fe7..120bd8f09 100644 --- a/website/source/docs/commands/index.html.markdown +++ b/website/source/docs/commands/index.html.markdown @@ -34,15 +34,15 @@ Common commands: console Interactive console for Terraform interpolations destroy Destroy Terraform-managed infrastructure fmt Rewrites config files to canonical format + force-unlock Manually unlock the terraform state get Download and install modules for the configuration graph Create a visual graph of Terraform resources import Import existing infrastructure into Terraform - init Initializes Terraform configuration from a module + init Initialize a new or existing Terraform configuration output Read an output from a state file plan Generate and show an execution plan push Upload this Terraform module to Atlas to run refresh Update local state file against real resources - remote Configure remote state storage show Inspect Terraform state or plan taint Manually mark a resource for recreation untaint Manually unmark a resource as tainted diff --git a/website/source/docs/state/remote/s3.html.md b/website/source/docs/state/remote/s3.html.md index a345533df..6abb430f1 100644 --- a/website/source/docs/state/remote/s3.html.md +++ b/website/source/docs/state/remote/s3.html.md @@ -91,6 +91,8 @@ The following configuration options or environment variables are supported: * `secret_key` / `AWS_SECRET_ACCESS_KEY` - (Optional) AWS secret access key. * `kms_key_id` - (Optional) The ARN of a KMS Key to use for encrypting the state. + * `lock_table` - (Optional) The name of a DynamoDB table to use for state + locking. The table must have a primary key named LockID. * `profile` - (Optional) This is the AWS profile name as set in the shared credentials file. * `shared_credentials_file` - (Optional) This is the path to the diff --git a/website/source/intro/getting-started/install.html.markdown b/website/source/intro/getting-started/install.html.markdown index a2e779a57..9ae769aa4 100644 --- a/website/source/intro/getting-started/install.html.markdown +++ b/website/source/intro/getting-started/install.html.markdown @@ -52,17 +52,18 @@ other commands, please read the help and docs before usage. Common commands: apply Builds or changes infrastructure + console Interactive console for Terraform interpolations destroy Destroy Terraform-managed infrastructure fmt Rewrites config files to canonical format + force-unlock Manually unlock the terraform state get Download and install modules for the configuration graph Create a visual graph of Terraform resources import Import existing infrastructure into Terraform - init Initializes Terraform configuration from a module + init Initialize a new or existing Terraform configuration output Read an output from a state file plan Generate and show an execution plan push Upload this Terraform module to Atlas to run refresh Update local state file against real resources - remote Configure remote state storage show Inspect Terraform state or plan taint Manually mark a resource for recreation untaint Manually unmark a resource as tainted @@ -70,6 +71,7 @@ Common commands: version Prints the Terraform version All other commands: + debug Debug output management (experimental) state Advanced state management ``` diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 5f7678518..60020d3aa 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -83,6 +83,10 @@ fmt + > + force-unlock + + > get