modules/workload_policy/variables.tf (53 lines of code) (raw):
variable "recovery_vault_name" {
type = string
description = "recovery_vault_name: specify a recovery_vault_name for the Azure Recovery Services Vault. Upper/Lower case letters, numbers and hyphens. number of characters 2-50"
validation {
error_message = "Naming error: follow this constrains. Upper/Lower case letters, numbers and hyphens. number of characters 2-50"
condition = can(regex("^[a-zA-Z0-9-]{2,50}$", var.recovery_vault_name))
}
}
variable "resource_group_name" {
type = string
description = "The resource group where the resources will be deployed."
}
variable "workload_backup_policy" {
type = object({
name = string
workload_type = string
settings = object({
time_zone = string
compression_enabled = bool
})
backup_frequency = string
protection_policy = map(object({
policy_type = string # description = "(required) Specify policy type. Full, Differential, Logs"
retention_daily_count = number
retention_weekly = optional(object({
count = optional(number, null)
weekdays = optional(set(string), null)
}), null)
# retention_daily = optional(number, null) # (Required) The count that is used to count retention duration with duration type Days. Possible values are between 7 and 35.
backup = optional(object({
time = optional(string)
frequency_in_minutes = optional(number)
weekdays = optional(set(string))
}), null)
retention_monthly = optional(object({
count = optional(number, null)
weekdays = optional(set(string), null)
weeks = optional(set(string), null)
monthdays = optional(set(number), null)
include_last_days = optional(bool, false)
}), null)
retention_yearly = optional(object({
count = optional(number, null)
months = optional(set(string), null)
weekdays = optional(set(string), null)
weeks = optional(set(string), null)
monthdays = optional(set(number), null)
include_last_days = optional(bool, false)
}), null)
}))
})
default = null
description = "(Required)"
}