UPD: refactored resource_type_opt_in_preference with a for loop

This commit is contained in:
xpk 2024-04-30 10:03:48 +08:00
parent 52b35ca6bc
commit b697a2b0ca
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

View File

@ -52,18 +52,7 @@ locals {
resource "aws_backup_region_settings" "ab-settings" { resource "aws_backup_region_settings" "ab-settings" {
resource_type_opt_in_preference = { resource_type_opt_in_preference = {
"Aurora" = local.backup-config.Aurora.enabled for k, v in local.backup-config : k => v.enabled
"DynamoDB" = local.backup-config.DynamoDB.enabled
"EBS" = local.backup-config.EBS.enabled
"EC2" = local.backup-config.EC2.enabled
"EFS" = local.backup-config.EFS.enabled
"FSx" = local.backup-config.FSx.enabled
"Redshift" = local.backup-config.Redshift.enabled
"RDS" = local.backup-config.RDS.enabled
# "Storage Gateway" = lookup(local.backup-config, "Storage Gateway").enabled
"VirtualMachine" = local.backup-config.VirtualMachine.enabled
"S3" = local.backup-config.S3.enabled
# not available in all regions "DocumentDB" = false
} }
} }