Skip to content

Commit d3f4866

Browse files
authored
fix: Add ECRReader permission role to beta scanner ecr (#134)
Add back both resource and data "ecr_reader" when using beta_scanning
1 parent 5e9b190 commit d3f4866

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/services/cloud-connector-ecs/permissions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ data "aws_iam_policy_document" "task_definition_reader" {
135135

136136
# image scanning - ecr
137137
resource "aws_iam_role_policy" "ecr_reader" {
138-
count = local.deploy_image_scanning_with_codebuild ? 1 : 0
138+
count = local.deploy_image_scanning ? 1 : 0
139139
name = "ECRReader"
140140
role = local.ecs_task_role_id
141141
policy = data.aws_iam_policy_document.ecr_reader[0].json
142142
}
143143

144144
data "aws_iam_policy_document" "ecr_reader" {
145-
count = local.deploy_image_scanning_with_codebuild ? 1 : 0
145+
count = local.deploy_image_scanning ? 1 : 0
146146
statement {
147147
effect = "Allow"
148148
actions = [

0 commit comments

Comments
 (0)