ci: mint rancher token from the vault rancher engine #9
Reference in New Issue
Block a user
Delete Branch "benvin/ephemeral-runner-creds"
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?
Why
The rancher2 provider has been authenticating with a static Rancher admin API token in
kv/service/terraform/rancher. Rancher API tokens cap at 90 days, so that secret needs manual rotation — the repo's own TODO. The Vault Rancher secrets engine is now deployed and the read grant onrancher/creds/ciis merged and applied (terraform-vault #143) for both theterraform_rancherAppRole and thewoodpecker_terraform_rancherk8s role, so the TODO can be closed.How
Makefile:vault_envnow setsTF_VAR_rancher_tokenfromvault read -field=token rancher/creds/ciinstead ofvault kv get; dropped the migration TODO and the KV mount/path/field vars.README.md: credential model section rewritten for the ephemeral engine creds.Tokens are now minted per run with a 1h lease and revoked in Rancher on expiry — nothing to rotate.
CI's plan job is the real validation here: it exercises the new
vault readend-to-end via the k8s role.Once this merges, the old KV secret
kv/service/terraform/rancheris unused and can be deleted.