File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
aws/terraform/modules/metaflow Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,10 @@ data "aws_iam_policy_document" "s3_kms" {
61
61
statement {
62
62
effect = " Allow"
63
63
64
- # TODO - reduce to Encrypt, Decrypt?
65
64
actions = [
66
65
" kms:Decrypt" ,
67
66
" kms:Encrypt" ,
68
- # "kms:ReEncryptTo",
69
- # "kms:ReEncryptFrom",
70
- # "kms:DescribeKey",
71
- # "kms:GenerateDataKey"
67
+ " kms:GenerateDataKey"
72
68
]
73
69
74
70
resources = [
@@ -224,6 +220,12 @@ resource "aws_iam_role_policy" "grant_custom_s3_batch" {
224
220
policy = data. aws_iam_policy_document . custom_s3_batch . json
225
221
}
226
222
223
+ resource "aws_iam_role_policy" "grant_s3_kms" {
224
+ name = " s3_kms"
225
+ role = aws_iam_role. batch_s3_task_role . name
226
+ policy = data. aws_iam_policy_document . s3_kms . json
227
+ }
228
+
227
229
resource "aws_iam_role_policy" "grant_deny_presigned_batch" {
228
230
name = " deny_presigned"
229
231
role = aws_iam_role. batch_s3_task_role . name
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ data "aws_iam_policy_document" "s3_kms" {
31
31
actions = [
32
32
" kms:Decrypt" ,
33
33
" kms:Encrypt" ,
34
+ " kms:GenerateDataKey"
34
35
]
35
36
36
37
resources = [
You can’t perform that action at this time.
0 commit comments