Is your feature request related to a problem? Please describe.
Backup policies in the base workspace are currently hard coded and non-configurable.
Describe the solution you'd like
I'd like to have the option to define custom backup policies when deploying a workspace.
Describe alternatives you've considered
Modifying the template to add more backup policies and a drop down to select them.
A separate file defining custom backup policies that could be read by the terraform
Additional context
templates/workspaces/base/terraform/backup/backup.tf
resource "azurerm_backup_policy_vm" "vm_policy" {
name = local.vm_backup_policy_name
resource_group_name = var.resource_group_name
recovery_vault_name = azurerm_recovery_services_vault.vault.name
timezone = "UTC"
backup {
frequency = "Daily"
time = "22:00"
}
retention_daily {
count = 14
}
retention_weekly {
count = 4
weekdays = ["Sunday"]
}
retention_monthly {
count = 12
weekdays = ["Monday"]
weeks = ["First"]
}
retention_yearly {
count = 2
months = ["December"]
weekdays = ["Sunday"]
weeks = ["Last"]
}
depends_on = [
azurerm_recovery_services_vault.vault
]
}
resource "azurerm_backup_policy_file_share" "file_share_policy" {
name = local.fs_backup_policy_name
resource_group_name = var.resource_group_name
recovery_vault_name = azurerm_recovery_services_vault.vault.name
timezone = "UTC"
backup {
frequency = "Daily"
time = "23:00"
}
retention_daily {
count = 14
}
retention_weekly {
count = 4
weekdays = ["Sunday"]
}
retention_monthly {
count = 12
weekdays = ["Monday"]
weeks = ["First"]
}
retention_yearly {
count = 2
months = ["December"]
weekdays = ["Sunday"]
weeks = ["Last"]
}
depends_on = [
azurerm_recovery_services_vault.vault
]
}
Is your feature request related to a problem? Please describe.
Backup policies in the base workspace are currently hard coded and non-configurable.
Describe the solution you'd like
I'd like to have the option to define custom backup policies when deploying a workspace.
Describe alternatives you've considered
Modifying the template to add more backup policies and a drop down to select them.
A separate file defining custom backup policies that could be read by the terraform
Additional context
templates/workspaces/base/terraform/backup/backup.tf