Skip to content

Commit 6418efc

Browse files
CCM-14149: Support Container Based Lambdas
1 parent 05bbc4d commit 6418efc

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

infrastructure/modules/lambda/data_iam_policy_document_ecr.tf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@ data "aws_iam_policy_document" "ecr" {
44

55
actions = [
66
"ecr:GetAuthorizationToken",
7+
]
8+
9+
resources = ["*"]
10+
}
11+
12+
statement {
13+
effect = "Allow"
14+
15+
actions = [
716
"ecr:BatchGetImage",
817
"ecr:GetDownloadUrlForLayer",
918
"ecr:BatchCheckLayerAvailability",
1019
]
1120

12-
resources = ["*"]
21+
resources = ["arn:aws:ecr:${var.region}:${var.aws_account_id}:repository/*"]
1322
}
14-
}
23+
}

infrastructure/modules/lambda/iam_role_policy_ecr.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ resource "aws_iam_role_policy" "ecr" {
33
name = "${local.csi}-ecr"
44
role = aws_iam_role.main.id
55
policy = data.aws_iam_policy_document.ecr.json
6-
}
6+
}

0 commit comments

Comments
 (0)