diff --git a/kubernetes_cluster_velero/01_main.tf b/kubernetes_cluster_velero/01_main.tf index 1c05a0c5..5dc5c553 100644 --- a/kubernetes_cluster_velero/01_main.tf +++ b/kubernetes_cluster_velero/01_main.tf @@ -23,16 +23,14 @@ module "velero_storage_account" { public_network_access_enabled = var.use_storage_private_endpoint ? false : true tags = var.tags - - - blob_delete_retention_days = var.enable_sa_backup ? var.sa_backup_retention_days : null + blob_delete_retention_days = var.sa_backup_retention_days blob_change_feed_enabled = var.enable_sa_backup blob_change_feed_retention_in_days = var.enable_sa_backup ? var.sa_backup_retention_days : null - blob_container_delete_retention_days = var.enable_sa_backup ? var.sa_backup_retention_days : null - blob_storage_policy = var.enable_sa_backup ? { + blob_container_delete_retention_days = var.sa_backup_retention_days + blob_storage_policy = { enable_immutability_policy = false blob_restore_policy_days = var.sa_backup_retention_days - } : null + } } diff --git a/kubernetes_cluster_velero/99_variables.tf b/kubernetes_cluster_velero/99_variables.tf index ea3628f8..7bddeaf7 100644 --- a/kubernetes_cluster_velero/99_variables.tf +++ b/kubernetes_cluster_velero/99_variables.tf @@ -90,7 +90,7 @@ variable "storage_account_kind" { variable "sa_backup_retention_days" { type = number description = "(Optional) number of days for which the storage account is available for point in time recovery" - default = 7 + default = 0 } variable "enable_sa_backup" {