Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mamari90 committed Nov 17, 2023
1 parent 632d1a5 commit 68c1c87
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kubernetes_cluster_velero/01_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ module "velero_storage_account" {
enable_low_availability_alert = false
public_network_access_enabled = var.use_storage_private_endpoint ? false : true
tags = var.tags

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.sa_backup_retention_days
blob_storage_policy = {
enable_immutability_policy = false
blob_restore_policy_days = var.sa_backup_retention_days
}

}

resource "azurerm_private_endpoint" "velero_storage_private_endpoint" {
Expand Down
12 changes: 12 additions & 0 deletions kubernetes_cluster_velero/99_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,15 @@ variable "storage_account_kind" {
default = "StorageV2"
description = "(Optional) Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2"
}

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
}

variable "enable_sa_backup" {
type = bool
description = "(Optional) enables storage account point in time recovery"
default = false
}

0 comments on commit 68c1c87

Please sign in to comment.