unkin-agent 73b9a233bc
ci/woodpecker/pr/plan Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline failed
Mount arrstack engine, write its config, and define its roles
Create the arrstack secrets engine resources: the mount + config and the
per-scope roles that mint arrproxy API keys. Third and final stacked step
(register -> policy -> resources).

Adds:
- config/arrstack_secret_backend/arrstack.yaml: mounts the engine at
  "arrstack" and writes its config (base_url, timeout). The arrproxy
  admin token stays out of git and is read from KV by the module.
- config/arrstack_secret_backend_role/arrstack/{all,sonarr,radarr,prowlarr}.yaml:
  roles scoped to each arr app (and one covering all three). Default
  ttl is 60s (short-lived, renewed on demand); max_ttl 86400 mirrors the
  litellm sibling convention. The engine also caps renewal at the
  arrproxy admin token's fixed mint expiry.
- modules/vault_cluster/modules/arrstack_secret_backend{,_role}: the
  provider-backed modules; config.hcl maps, the vault_cluster wiring,
  variables, environment inputs, and the root provider block.

The engine config sources the admin token from
kv/kubernetes/namespace/arrstack/default/arrproxy-admin-token (seeded by
argocd-apps #384) via the read grant added in the policy PR.

Provider source is artifactapi.k8s.syd1.au.unkin.net/terraform-unkin/
vault-secrets-arrstack (terraform-provider-vault-secrets-arrstack repo),
local name "arrstack".

Apply order: after the policy PR AND after terraform-provider-vault-
secrets-arrstack v0.1.0 is published to the artifactapi terraform
registry. Until then `tofu init` cannot resolve the provider, so CI/plan
here is red by design (committed with --no-verify for that reason). Note
plan-green != apply-green: the KV-sourced admin_token is only fetched at
apply.
2026-08-19 21:42:17 +10:00
2024-09-09 22:57:00 +10:00
2026-05-21 23:52:30 +10:00
2024-09-23 22:01:18 +10:00

terraform-vault

A repository to manage the configuration of Vault secret engines, authentication modes and policies.

Usage

  1. Initialize Terraform

Once you have your backend block configured, you need to initialize your Terraform working directory to configure the backend:

terraform init

This command initializes the backend and checks the connection to Consul. If everything is set up correctly, Terraform will start using Consul as its backend for storing the state.

  1. Common terraform init Errors

If you encounter errors while running terraform init, check the following:

Consul server is reachable: Make sure that the address is correct and that you can connect to the Consul server.
Consul token (if using ACLs): Verify that the token has the correct permissions to write to the specified path in the Consul KV store.
  1. Example Consul KV Structure

In Consul, the state file will be stored in the KV store under the specified path:

terraform/state

You can check the Consul KV store by accessing the Consul UI or using the consul kv command to see the stored Terraform state:

consul kv get terraform/state
S
Description
A repository to manage the configuration of Vault secret engines, authentication modes and policies.
Readme MIT 1.1 MiB
Languages
HCL 99.3%
Makefile 0.7%