ci: mint rancher token from the vault rancher engine
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful

Retire the static 90-day admin token in kv/service/terraform/rancher; the
vault rancher engine and the read grant on rancher/creds/ci are live.

- Makefile: vault_env reads TF_VAR_rancher_token from rancher/creds/ci
- README: document the ephemeral 1h credential model
This commit is contained in:
2026-08-30 14:12:23 +10:00
parent 8322c5480e
commit 6db8100aba
2 changed files with 8 additions and 15 deletions
+4 -7
View File
@@ -28,13 +28,10 @@ make format # fmt tofu + terragrunt hcl
### Authentication
The rancher2 provider needs a Rancher admin API token, read from Vault at
`kv/service/terraform/rancher` (field `token`).
> **Note:** Rancher API tokens have a **90-day maximum** lifetime, so the static
> token must be rotated. This is intended to move to a dedicated Vault Rancher
> secrets engine that mints short-lived tokens on demand; when that lands, update
> the Makefile `vault_env` helper to `vault read` from that engine.
The rancher2 provider needs a Rancher API token, minted on demand by the Vault
Rancher secrets engine at `rancher/creds/ci`. The token is ephemeral (1h lease)
and Vault revokes it in Rancher when the lease expires, so nothing needs
rotating.
Set `VAULT_ROLEID` for local AppRole auth, or `VAULT_AUTH_METHOD=kubernetes`
for CI (Woodpecker).