modules/file_share_policy/variables.tf (102 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 "file_share_backup_policy" { type = object({ name = string timezone = string frequency = string retention_daily = optional(number, null) backup = object({ time = string hourly = optional(object({ interval = number start_time = string window_duration = number })) }) retention_weekly = optional(object({ count = optional(number, 7) weekdays = optional(list(string), []) }), {}) retention_monthly = optional(object({ count = optional(number, 0) weekdays = optional(list(string), []) weeks = optional(list(string), []) days = optional(list(number), []) include_last_days = optional(bool, false) }), {}) retention_yearly = optional(object({ count = optional(number, 0) months = optional(list(string), []) weekdays = optional(list(string), []) weeks = optional(list(string), []) days = optional(list(number), []) include_last_days = optional(bool, false) }), {}) }) default = null description = <<DESCRIPTION A map objects for backup and retation options. - `name` - (Optional) The name of the private endpoint. One will be generated if not set. - `role_assignments` - (Optional) A map of role assignments to create on the - `backup` - (required) backup options. - `frequency` - (Required) Sets the backup frequency. Possible values are hourly, Daily and Weekly. - `time` - (required) Specify time in a 24 hour format HH:MM. "22:00" - `hour_interval` - (Optional) Interval in hour at which backup is triggered. Possible values are 4, 6, 8 and 12. This is used when frequency is hourly. 6 - `hour_duration` - (Optional) Duration of the backup window in hours. Possible values are between 4 and 24 This is used when frequency is hourly. 12 - `weekdays` - (Optional) The days of the week to perform backups on. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. This is used when frequency is Weekly. ["Tuesday", "Saturday"] - `retention_daily` - (Optional) - `count` - - `retantion_weekly` - - `count` - - `weekdays` - - `retantion_monthly` - - `count` - # (Required) The number of monthly backups to keep. Must be between 1 and 9999 - `weekdays` - (Optional) The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. - `weeks` - # (Optional) The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last. - `days` - # (Optional) The days of the month to retain backups of. Must be between 1 and 31. - `include_last_days` - # (Optional) Including the last day of the month, default to false. - `retantion_yearly` - - `months` - # (Required) The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, August, September, October, November and December. - `count` - # (Required) The number of monthly backups to keep. Must be between 1 and 9999 - `weekdays` - (Optional) The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. - `weeks` - # (Optional) The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last. - `days` - # (Optional) The days of the month to retain backups of. Must be between 1 and 31. - `include_last_days` - # (Optional) Including the last day of the month, default to false. example: retentions = { rest1 = { backup = { frequency = "hourly" time = "22:00" hour_interval = 6 hour_duration = 12 # weekdays = ["Tuesday", "Saturday"] } retention_daily = 7 retention_weekly = { count = 7 weekdays = ["Monday", "Wednesday"] } retention_monthly = { count = 5 # weekdays = ["Tuesday","Saturday"] # weeks = ["First","Third"] days = [3, 10, 20] } retention_yearly = { count = 5 months = [] # weekdays = ["Tuesday","Saturday"] # weeks = ["First","Third"] days = [3, 10, 20] } } } DESCRIPTION }