-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
1 changed file
with
35 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 |
---|---|---|
|
@@ -24,6 +24,41 @@ Once you have applied a plan the changes to the terraform config should be | |
pushed to the `main` branch immediately so that we minimize the change of other | ||
people applying stale configurations. | ||
|
||
### FEI (Frequently Encountered Issues) | ||
|
||
#### What to do if you get a locked state | ||
|
||
``` | ||
% terraform plan | ||
╷ | ||
│ Error: Error acquiring the state lock | ||
│ | ||
│ Error message: operation error DynamoDB: PutItem, https response error StatusCode: 400, RequestID: | ||
│ IBL35BESTVD1GQID3TRON01ADFVV4KQNSO5AEMVJF66Q9ASUAAJG, ConditionalCheckFailedException: The conditional request failed | ||
│ Lock Info: | ||
│ ID: 7622a128-79f1-2179-815a-d821369a815e | ||
│ Path: ooni-production-terraform-state/terraform.tfstate | ||
│ Operation: OperationTypeApply | ||
│ Who: [email protected] | ||
│ Version: 1.7.0 | ||
│ Created: 2024-02-05 11:51:45.398054 +0000 UTC | ||
│ Info: | ||
│ | ||
│ | ||
│ Terraform acquires a state lock to protect the state from being written | ||
│ by multiple users at the same time. Please resolve the issue above and try | ||
│ again. For most commands, you can disable locking with the "-lock=false" | ||
│ flag, but this is not recommended. | ||
``` | ||
|
||
``` | ||
% terraform force-unlock -force 7622a128-79f1-2179-815a-d821369a815e | ||
Terraform state has been successfully unlocked! | ||
The state has been unlocked, and Terraform commands should now be able to | ||
obtain a new lock on the remote state. | ||
``` | ||
|
||
### Notes | ||
|
||
https://www.terraform-best-practices.com/naming | ||
|