-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9434670
commit c42e033
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# tflock | ||
|
||
Lock your Terraform state manually. | ||
|
||
# Why | ||
|
||
Terraform has a state lock mechanism and it works automatically. Nevertheless, I found it's useful to lock state manually when I don't want team members to touch code during refactorings of Terraform configurations. | ||
Terraform has the `terraform force-unlock` command for when somthing goes wrong, and it doesn't provide the `terraform lock` command. It seems that this decision was by design. Not all backend types can acquire explicit lock. For more details, see https://github.com/hashicorp/terraform/issues/17203 | ||
|
||
But I want `terraform lock` command! | ||
|
||
# Features | ||
|
||
- Lock your Terraform state manually. | ||
|
||
That's all. | ||
|
||
I'm testing in Terraform 0.12 + backend type s3 (lock with dynamodb). | ||
Other backend types may or may not work. | ||
|
||
# Install | ||
|
||
Required: Go 1.13+. | ||
|
||
``` | ||
$ go get github.com/minamijoyo/tflock | ||
``` | ||
|
||
# License | ||
MIT |