Encrypt Terraform state with OpenBao Transit #99
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/iac#99
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal: Terraform state is encrypted at rest, and an OpenBao policy decides who can decrypt it.
OpenTofu has built-in state encryption, and one key provider is OpenBao Transit. The state Secret on mini holds ciphertext. Decrypting it needs the Transit key, so who may read each root's state becomes an OpenBao policy, and every decrypt shows up in OpenBao's audit log.
This is defence in depth on top of keeping secrets out of state.
Work
encryptionblock in a test root, then plan and apply round trips.fallbacksetting, so existing unencrypted state still reads.