terraform-aws-backup
terraform-aws-backup copied to clipboard
Add advanced_backup_setting
what
- Add advanced_backup_setting
why
- Backs up a specific resource like EC2. Only works for windows at the moment.
references
- Closes https://github.com/cloudposse/terraform-aws-backup/issues/35
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/backup_plan#advanced_backup_setting
/test all
/test all
since this option is only available for Windows VSS (https://docs.aws.amazon.com/aws-backup/latest/devguide/API_AdvancedBackupSetting.html), I'd prefer a simple switch rather than an arbitrary data structure.
for example, if say var.windows_vss_backup
is true, then we enable this block:
advanced_backup_setting {
backup_options = {
WindowsVSS = "enabled"
}
resource_type = "EC2"
}
so maybe something like this instead:
variable "windows_vss_backup" {
type = bool
default = false
}
dynamic "advanced_backup_setting" {
for_each = var.windows_vss_backup ? [true] : []
content {
backup_options = {
WindowsVSS = "enabled"
}
resource_type = "EC2"
}
}
Closing this as this should be resolved by #63