File tree Expand file tree Collapse file tree
terraform/backup-infrastructure
modules/aws-backup-destination Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,28 +41,4 @@ data "aws_iam_policy_document" "vault_policy" {
4141 resources = [" *" ]
4242 }
4343 }
44-
45- dynamic "statement" {
46- for_each = var. enable_vault_protection ? [1 ] : []
47- content {
48- sid = " DenyBackupCopyExceptToSourceAccount"
49- effect = " Deny"
50-
51- principals {
52- type = " AWS"
53- identifiers = [" arn:aws:iam::${ var . account_id } :root" ]
54- }
55- actions = [
56- " backup:CopyFromBackupVault"
57- ]
58- resources = [" *" ]
59- condition {
60- test = " StringNotEquals"
61- variable = " backup:CopyTargets"
62- values = [
63- " arn:aws:backup:${ var . region } :${ var . source_account_id } :backup-vault:${ var . region } -${ var . source_account_id } -backup-vault"
64- ]
65- }
66- }
67- }
6844}
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ module "destination" {
2828 account_id = local. destination_account_id
2929 source_account_id = local. source_account_id
3030 kms_key = aws_kms_key. destination_backup_key . arn
31- enable_vault_protection = false
31+ enable_vault_protection = true
32+ vault_lock_type = " compliance"
3233}
3334
3435# ##
You can’t perform that action at this time.
0 commit comments