Merge pull request #11914 from hashicorp/jbardin/state-locking

Add force-unlock command to the docs
This commit is contained in:
James Bardin 2017-02-13 15:40:23 -05:00 committed by GitHub
commit 320840f4d5
6 changed files with 45 additions and 4 deletions

View File

@ -22,6 +22,8 @@ FEATURES:
no more local caching of remote state, and more. [GH-11286] no more local caching of remote state, and more. [GH-11286]
* **Destroy Provisioners:** Provisioners can now be configured to run * **Destroy Provisioners:** Provisioners can now be configured to run
on resource destruction. [GH-11329] 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: IMPROVEMENTS:

View File

@ -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.

View File

@ -34,15 +34,15 @@ Common commands:
console Interactive console for Terraform interpolations console Interactive console for Terraform interpolations
destroy Destroy Terraform-managed infrastructure destroy Destroy Terraform-managed infrastructure
fmt Rewrites config files to canonical format fmt Rewrites config files to canonical format
force-unlock Manually unlock the terraform state
get Download and install modules for the configuration get Download and install modules for the configuration
graph Create a visual graph of Terraform resources graph Create a visual graph of Terraform resources
import Import existing infrastructure into Terraform 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 output Read an output from a state file
plan Generate and show an execution plan plan Generate and show an execution plan
push Upload this Terraform module to Atlas to run push Upload this Terraform module to Atlas to run
refresh Update local state file against real resources refresh Update local state file against real resources
remote Configure remote state storage
show Inspect Terraform state or plan show Inspect Terraform state or plan
taint Manually mark a resource for recreation taint Manually mark a resource for recreation
untaint Manually unmark a resource as tainted untaint Manually unmark a resource as tainted

View File

@ -91,6 +91,8 @@ The following configuration options or environment variables are supported:
* `secret_key` / `AWS_SECRET_ACCESS_KEY` - (Optional) AWS secret access key. * `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 * `kms_key_id` - (Optional) The ARN of a KMS Key to use for encrypting
the state. 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 * `profile` - (Optional) This is the AWS profile name as set in the
shared credentials file. shared credentials file.
* `shared_credentials_file` - (Optional) This is the path to the * `shared_credentials_file` - (Optional) This is the path to the

View File

@ -52,17 +52,18 @@ other commands, please read the help and docs before usage.
Common commands: Common commands:
apply Builds or changes infrastructure apply Builds or changes infrastructure
console Interactive console for Terraform interpolations
destroy Destroy Terraform-managed infrastructure destroy Destroy Terraform-managed infrastructure
fmt Rewrites config files to canonical format fmt Rewrites config files to canonical format
force-unlock Manually unlock the terraform state
get Download and install modules for the configuration get Download and install modules for the configuration
graph Create a visual graph of Terraform resources graph Create a visual graph of Terraform resources
import Import existing infrastructure into Terraform 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 output Read an output from a state file
plan Generate and show an execution plan plan Generate and show an execution plan
push Upload this Terraform module to Atlas to run push Upload this Terraform module to Atlas to run
refresh Update local state file against real resources refresh Update local state file against real resources
remote Configure remote state storage
show Inspect Terraform state or plan show Inspect Terraform state or plan
taint Manually mark a resource for recreation taint Manually mark a resource for recreation
untaint Manually unmark a resource as tainted untaint Manually unmark a resource as tainted
@ -70,6 +71,7 @@ Common commands:
version Prints the Terraform version version Prints the Terraform version
All other commands: All other commands:
debug Debug output management (experimental)
state Advanced state management state Advanced state management
``` ```

View File

@ -83,6 +83,10 @@
<a href="/docs/commands/fmt.html">fmt</a> <a href="/docs/commands/fmt.html">fmt</a>
</li> </li>
<li<%= sidebar_current("docs-commands-force-unlock") %>>
<a href="/docs/commands/force-unlock.html">force-unlock</a>
</li>
<li<%= sidebar_current("docs-commands-get") %>> <li<%= sidebar_current("docs-commands-get") %>>
<a href="/docs/commands/get.html">get</a> <a href="/docs/commands/get.html">get</a>
</li> </li>