No description
Find a file
2026-01-05 15:23:28 +01:00
.gitsecret update k8s 2025-10-24 20:51:33 +02:00
assets Initial commit 2025-04-03 10:03:46 +02:00
.gitignore Initial commit 2025-04-03 10:03:46 +02:00
.opentofu-version Initial commit 2025-04-03 10:03:46 +02:00
.terraform.lock.hcl create kubernetes secrets 2026-01-05 15:23:28 +01:00
main.tf create kubernetes secrets 2026-01-05 15:23:28 +01:00
README.md Initial commit 2025-04-03 10:03:46 +02:00
terraform.tfvars.secret update k8s 2025-10-24 20:51:33 +02:00
variables.tf Update restic repositories 2025-04-18 10:33:10 +02:00

infra-secrets

This project contains all secrets stored that are reused onto my other repositories and stacks. These secrets are stored on the OpenBao service.

Usage

When manipulating this stack, it is needed to decrypt the variables file. This file is encrypted using git-secret, and uses GPG for encryption.

Encrypt

Needed before uploading to Git, otherwise the new secret values will not be stored.

$ git-secret hide

Decrypt

Required before doing antything, otherwise the terraform.tfvars file will not exist.

$ git-secret reveal

Apply changes

This stack uses OpenTofu instead of Terraform. I recommend using tofu-env. The .opentofu-version file will force the same OpenTofu version accross any environment.

$ tofu init
$ tofu apply

Variables

There is one single variable called secrets. This is a map of maps. Each object is a dedicated secret which contains multiple keys. For example, the following code will create two secrets: secret1 and secret2, each of them with two keys.

This is useful to group secrets. For example, to place all Cloudflare or Grafana secrets together.

secrets = {
    secret1 = {
        key1 = value1
        key2 = value2
    }
    secret2 = {
        key1 = value1
        key2 = value2
    }
}

List of secrets

Keys in a secret