mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
39 lines
No EOL
828 B
HCL
39 lines
No EOL
828 B
HCL
variable "postgres_password" {
|
|
type = string
|
|
}
|
|
|
|
resource "kubernetes_secret" "postgres_auth_secret" {
|
|
metadata {
|
|
name = "postgres-auth-secret"
|
|
namespace = "postgresql"
|
|
}
|
|
data = {
|
|
postgresPassword = var.postgres_password
|
|
}
|
|
type = "Opaque"
|
|
}
|
|
|
|
resource "helm_release" "postgresql" {
|
|
name = "postgresql"
|
|
repository = "https://charts.bitnami.com/bitnami"
|
|
chart = "postgresql"
|
|
create_namespace = true
|
|
namespace = "postgresql"
|
|
|
|
timeout = var.helm_timeout
|
|
cleanup_on_fail = true
|
|
force_update = true
|
|
|
|
values = [
|
|
yamlencode({
|
|
global = {
|
|
postgresql = {
|
|
auth = {
|
|
existingSecret = "postgres-auth-secret"
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
]
|
|
} |