23 lines
537 B
HCL
23 lines
537 B
HCL
output "conn_string" {
|
|
value = "postgres://${urlencode(data.kubernetes_secret_v1.credentials.data["username"])}:${urlencode(data.kubernetes_secret_v1.credentials.data["password"])}@${local.app_slug}-pg-rw.${var.namespace}.svc:5432/${var.component}"
|
|
}
|
|
|
|
output "service" {
|
|
value = "${local.app_slug}-pg-rw.${var.namespace}.svc"
|
|
}
|
|
|
|
output "db_host" {
|
|
value = "${local.app_slug}-pg-rw"
|
|
}
|
|
|
|
output "db_name" {
|
|
value = var.component
|
|
}
|
|
|
|
output "db_port" {
|
|
value = "5432"
|
|
}
|
|
|
|
output "secret_name" {
|
|
value = "${local.app_slug}-pg-app"
|
|
} |