File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed
Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,14 @@ data "aws_iam_policy_document" "kms" {
5656 }
5757
5858 statement {
59- sid = " AllowSES "
59+ sid = " AllowS3 "
6060 effect = " Allow"
6161
6262 principals {
6363 type = " Service"
6464
6565 identifiers = [
66- " ses .amazonaws.com" ,
66+ " s3 .amazonaws.com" ,
6767 ]
6868 }
6969
@@ -78,15 +78,31 @@ data "aws_iam_policy_document" "kms" {
7878 resources = [
7979 " *" ,
8080 ]
81+ }
8182
82- condition {
83- test = " ArnLike "
84- variable = " aws:SourceArn "
83+ statement {
84+ sid = " AllowSES "
85+ effect = " Allow "
8586
86- values = [
87- " arn:aws:ses:${ var . region } :${ var . aws_account_id } :receipt-rule-set:*" ,
87+ principals {
88+ type = " Service"
89+
90+ identifiers = [
91+ " ses.amazonaws.com" ,
8892 ]
8993 }
94+
95+ actions = [
96+ " kms:Encrypt*" ,
97+ " kms:Decrypt*" ,
98+ " kms:ReEncrypt*" ,
99+ " kms:GenerateDataKey*" ,
100+ " kms:Describe*"
101+ ]
102+
103+ resources = [
104+ " *" ,
105+ ]
90106 }
91107
92108 statement {
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ resource "aws_ses_receipt_rule" "store_email" {
1818 position = 1
1919 bucket_name = module. s3bucket_ses . 0 . id
2020 object_key_prefix = " emails/"
21- kms_key_arn = var. kms_key_arn
2221 iam_role_arn = aws_iam_role. ses_receipts . 0 . arn
2322 }
2423}
You can’t perform that action at this time.
0 commit comments