feat: manage litellm secrets engine via terraform-provider-litellmvaultsecret
The vault-plugin-secrets-litellm engine mints LiteLLM virtual keys and is now registered in Vault, but nothing declared its mount/config or roles in this repo. Wire in the companion litellm provider so the mount is managed as code alongside the other secret backends. - Add litellm_secret_backend module: mounts the engine and writes its config (base_url, request_timeout_seconds); reads master_key from KV - Add litellm_secret_backend_role module: manages roles (models, max_budget, key_alias_prefix, ttl/max_ttl seconds, metadata) - Register both modules in vault_cluster main.tf and variables.tf - Discover litellm_secret_backend[_role] YAML in config.hcl and pass them through terragrunt inputs - Declare the litellm provider (litellmvaultsecret) and a provider block in the generated root backend.tf - Add example config for the litellm mount and a sample role
This commit is contained in:
@@ -289,6 +289,32 @@ variable "kubernetes_secret_backend_role" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "litellm_secret_backend" {
|
||||
description = "Map of LiteLLM secret engines to create (mount + config). The master key is read from KV"
|
||||
type = map(object({
|
||||
plugin = optional(string, "vault-plugin-secrets-litellm")
|
||||
description = optional(string)
|
||||
base_url = string
|
||||
request_timeout_seconds = optional(number, 30)
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "litellm_secret_backend_role" {
|
||||
description = "Map of LiteLLM roles to create"
|
||||
type = map(object({
|
||||
name = string
|
||||
backend = string
|
||||
models = optional(list(string))
|
||||
max_budget = optional(number)
|
||||
key_alias_prefix = optional(string)
|
||||
ttl = optional(number)
|
||||
max_ttl = optional(number)
|
||||
metadata = optional(map(string))
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "policy_auth_map" {
|
||||
description = "Map of auth mounts -> auth roles -> policy names"
|
||||
type = map(map(list(string)))
|
||||
|
||||
Reference in New Issue
Block a user