fix
This commit is contained in:
@@ -2,7 +2,7 @@ locals {
|
||||
pg-labels = merge(local.common-labels, {
|
||||
"app.kubernetes.io/component" = "pg"
|
||||
})
|
||||
backup-def = var.backups.enable ? {
|
||||
backup-def = {
|
||||
barmanObjectStore = {
|
||||
destinationPath = "s3://${var.instance}-${var.namespace}/"
|
||||
endpointURL = "${var.backups.endpoint}/barman"
|
||||
@@ -17,7 +17,7 @@ locals {
|
||||
}
|
||||
}
|
||||
}
|
||||
} : {}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "prj_pg" {
|
||||
@@ -38,7 +38,7 @@ resource "kubectl_manifest" "prj_pg" {
|
||||
initdb:
|
||||
database: "${var.component}"
|
||||
owner: "${var.component}"
|
||||
backup: ${jsonencode(local.backup-def)}
|
||||
backup: ${jsonencode(var.backups.enable?local.backup-def:{})}
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user