Mount the rancher secrets engine + seed a service account + roles
Deploys the Rancher token secrets engine into the cluster, mirroring the litellm and gpg wiring. The plugin is registered separately (config/plugins) and the deployer policy is granted separately; this mounts and configures the engine. - Add rancher_secret_backend module (mount + config via the ranchervaultsecret provider): rancher_url https://rancher.k8s.syd1.au.unkin.net. - Add rancher_secret_backend_service_account module: seeds an auto-rotated token (90d TTL / 45d rotation), reading the seed token from KV at secret_backend/rancher/service_account/<name> (keys: token, token_name). - Add rancher_secret_backend_role module + a 'ci' role (1h/8h scoped creds). - Wire config.hcl discovery, module variables, main.tf module blocks, the terragrunt inputs, and the rancher provider in root.hcl. Prereq: populate kv/service/vault/au/syd1/secret_backend/rancher/service_account/admin with a live Rancher admin token before apply.
This commit is contained in:
@@ -74,6 +74,10 @@ inputs = {
|
||||
gpg_secret_backend = local.config.gpg_secret_backend
|
||||
gpg_key = local.config.gpg_key
|
||||
|
||||
rancher_secret_backend = local.config.rancher_secret_backend
|
||||
rancher_secret_backend_service_account = local.config.rancher_secret_backend_service_account
|
||||
rancher_secret_backend_role = local.config.rancher_secret_backend_role
|
||||
|
||||
# Pass policy maps to vault_cluster module
|
||||
policy_auth_map = local.policies.policy_auth_map
|
||||
policy_rules_map = local.policies.policy_rules_map
|
||||
|
||||
@@ -23,6 +23,12 @@ provider "gpg" {
|
||||
address = local.vault_addr
|
||||
}
|
||||
|
||||
# The rancher token secrets engine is managed through its own provider (same
|
||||
# Vault server; token falls back to VAULT_TOKEN).
|
||||
provider "rancher" {
|
||||
address = local.vault_addr
|
||||
}
|
||||
|
||||
terraform {
|
||||
backend "consul" {
|
||||
address = "https://consul.service.consul"
|
||||
@@ -49,6 +55,10 @@ terraform {
|
||||
source = "artifactapi.k8s.syd1.au.unkin.net/terraform-unkin/gpgvaultsecret"
|
||||
version = "0.1.0"
|
||||
}
|
||||
rancher = {
|
||||
source = "artifactapi.k8s.syd1.au.unkin.net/terraform-unkin/ranchervaultsecret"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user