Skip to content

Commit 6b94477

Browse files
author
iru
authored
docs: howto unlock tf state
1 parent d624c81 commit 6b94477

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

CONTRIBUTE.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,16 @@ Implemented vía **Terraform Kitchen** | https://newcontext-oss.github.io/kitche
8383

8484
Because CI/CD sometimes fail, we setup the Terraform state to be handled in backend (s3+dynamo) within the Sysdig AWS backend (sysdig-test-account).
8585

86-
#### Howto unlock terraform backend
86+
#### Remote state cleanup from local
8787

88+
In case you need to handle terraform backend state from failing kitchen tests, some guidance for using the `backend.tf` remote state manifest, present on each test
89+
- Configure same parameters as the github action, that is `AWS_PROFILE`, and leave default `name` and `region` values
90+
- Kitchen works with `terraform workspaces` so, in case you want to fix a specific test, switch to that workspace after the `terraform init` with `terraform workspace select WORKSPACE`
91+
- Perform the desired terraform task
92+
93+
You can also use `kitchen destroy` instead of `terraform` but the requirements are the same, except that the workspace will be managed through kitchen
94+
95+
#### State unlock
8896
```
8997
# go to the specific test ex.:
9098
cd test/fixtures/single-subscription
@@ -96,15 +104,6 @@ terraform workspace select kitchen-terraform-WORKSPACE_NAME
96104
terraform force-unlock LOCK_ID
97105
```
98106

99-
### Remote state cleanup from local
100-
101-
In case you need to handle terraform backend state from failing kitchen tests, some guidance for using the `backend.tf` remote state manifest, present on each test
102-
- Configure same parameters as the github action, that is `AWS_PROFILE`, and leave default `name` and `region` values
103-
- Kitchen works with `terraform workspaces` so, in case you want to fix a specific test, switch to that workspace after the `terraform init` with `terraform workspace select WORKSPACE`
104-
- Perform the desired terraform task
105-
106-
You can also use `kitchen destroy` instead of `terraform` but the requirements are the same, except that the workspace will be managed through kitchen
107-
108107

109108
### Running Kitchen tests locally
110109

0 commit comments

Comments
 (0)