Skip to content

Commit e40edd3

Browse files
committed
Changes to backups
1 parent 830b977 commit e40edd3

File tree

2 files changed

+8
-9
lines changed
  • terraform_aws_backup/aws-backup-source/modules/aws_config

2 files changed

+8
-9
lines changed

terraform_aws_backup/aws-backup-source/modules/aws_config/kms.tf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,4 @@ data "aws_iam_policy_document" "backup_key_policy" {
3131
actions = ["kms:*"]
3232
resources = ["*"]
3333
}
34-
statement {
35-
sid = "AllowBackupUseOfKey"
36-
principals {
37-
type = "Service"
38-
identifiers = ["sns.amazonaws.com"]
39-
}
40-
actions = ["kms:GenerateDataKey", "kms:Decrypt"]
41-
resources = ["*"]
42-
}
4334
}

terraform_aws_backup/aws-backup-source/modules/aws_config/sns.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ resource "aws_kms_key" "sns_encrypt_key" {
5858
Action = ["kms:GenerateDataKey*", "kms:Decrypt"]
5959
Resource = "*"
6060
},
61+
{
62+
Effect = "Allow"
63+
Principal = {
64+
Service = "backup.amazonaws.com"
65+
}
66+
Action = ["kms:GenerateDataKey*", "kms:Decrypt"]
67+
Resource = "*"
68+
},
6169
]
6270
})
6371
}

0 commit comments

Comments
 (0)