claude-memory: read DB password from Vault KV instead of tfvars

Vault DB engine rotates the password every 24h, so the static tfvars
value was stale. Now reads from secret/claude-memory db_password key.
This commit is contained in:
Viktor Barzin 2026-03-15 18:22:29 +00:00
parent 90b7d6ebb5
commit a2720f6a4c

View file

@ -111,7 +111,7 @@ resource "kubernetes_deployment" "claude-memory" {
env {
name = "DATABASE_URL"
value = "postgresql://claude_memory:${var.claude_memory_db_password}@${var.postgresql_host}:5432/claude_memory"
value = "postgresql://claude_memory:${data.vault_kv_secret_v2.secrets.data["db_password"]}@${var.postgresql_host}:5432/claude_memory"
}
env {
name = "API_KEY"