Skip to content
Snippets Groups Projects
Commit c27e889a authored by Timo Furrer's avatar Timo Furrer
Browse files

Merge branch 'document-encryption-local' into 'main'

Document how to work with auto-encrypted states locally

Closes #124

See merge request components/opentofu!267
parents 365f311d 3a1b750c
No related branches found
No related tags found
No related merge requests found
Pipeline #268627 passed
...@@ -175,6 +175,16 @@ include: ...@@ -175,6 +175,16 @@ include:
stages: [validate, build, deploy] stages: [validate, build, deploy]
``` ```
#### Working with encrypted states locally
To locally work with encrypted states that have been auto encrypted by the component you can
manually do what the component does:
Copy the encryption setup from [the `configure_encryption_for_tofu` function](/src/gitlab-tofu.sh#L310)
into a temporary file called `encryption.tf` or expose it in the `TF_ENCRYPTION` variable - make sure to
correctly set your passphrase the match the value from GitLab CI. Then you can simply continue using your
regular `tofu` tooling.
### Configure `id_tokens` ### Configure `id_tokens`
> [!note] > [!note]
......
...@@ -177,6 +177,16 @@ include: ...@@ -177,6 +177,16 @@ include:
stages: [validate, build, deploy] stages: [validate, build, deploy]
``` ```
#### Working with encrypted states locally
To locally work with encrypted states that have been auto encrypted by the component you can
manually do what the component does:
Copy the encryption setup from [the `configure_encryption_for_tofu` function](/src/gitlab-tofu.sh#L310)
into a temporary file called `encryption.tf` or expose it in the `TF_ENCRYPTION` variable - make sure to
correctly set your passphrase the match the value from GitLab CI. Then you can simply continue using your
regular `tofu` tooling.
### Configure `id_tokens` ### Configure `id_tokens`
> [!note] > [!note]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment