feat: manage litellm secrets engine via terraform-provider-litellmvaultsecret #83
Reference in New Issue
Block a user
Delete Branch "benvin/litellm-secrets-engine"
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
vault-plugin-secrets-litellmengine (mints LiteLLM virtual keys) is registered in Vault, but nothing in this repo declared its mount, config, or roles. This wires in the companionlitellmprovider (git.unkin.net/unkin/litellmvaultsecret) so the mount is managed as code alongside the other secret backends.Changes
litellm_secret_backendmodule that mounts the engine and writes its config (base_url,request_timeout_seconds); reads the sensitivemaster_keyfrom KV atkv/service/vault/<country>/<region>/secret_backend/<path>, matching the consul/kubernetes backend convention.litellm_secret_backend_rolemodule that manages roles (models,max_budget,key_alias_prefix,ttl/max_ttlin seconds,metadata).vault_clustermain.tfand add typed variables invariables.tf.litellm_secret_backend[_role]YAML inconfig.hcland pass the maps through the terragrunt inputs.litellmprovider (pinned0.1.0) and aprovider "litellm"block in the generated rootbackend.tf.litellmmount and a sampleteam-arole.Notes
master_keyKV secret to exist atkv/service/vault/au/syd1/secret_backend/litellmbefore apply (the module reads it, does not create it).git.unkin.net/unkin/litellmvaultsecret0.1.0is published to the artifactapiterraform-unkinregistry.bf2c553716to2f0123eff81c56ce5d98to9e2c21131f