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 = {
|
||||
retentionPolicy = var.backups.retention.db
|
||||
barmanObjectStore = {
|
||||
destinationPath = "s3://${var.instance}-${var.namespace}/"
|
||||
@@ -18,7 +18,7 @@ locals {
|
||||
}
|
||||
}
|
||||
}
|
||||
} : {}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "prj_pg" {
|
||||
@@ -39,7 +39,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