Skip to content

Commit

Permalink
fix: Add ECRReader permission role to beta scanner ecr (#134)
Browse files Browse the repository at this point in the history
Add back both resource and data "ecr_reader" when using beta_scanning
  • Loading branch information
miketnt authored Oct 17, 2022
1 parent 5e9b190 commit d3f4866
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/services/cloud-connector-ecs/permissions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ data "aws_iam_policy_document" "task_definition_reader" {

# image scanning - ecr
resource "aws_iam_role_policy" "ecr_reader" {
count = local.deploy_image_scanning_with_codebuild ? 1 : 0
count = local.deploy_image_scanning ? 1 : 0
name = "ECRReader"
role = local.ecs_task_role_id
policy = data.aws_iam_policy_document.ecr_reader[0].json
}

data "aws_iam_policy_document" "ecr_reader" {
count = local.deploy_image_scanning_with_codebuild ? 1 : 0
count = local.deploy_image_scanning ? 1 : 0
statement {
effect = "Allow"
actions = [
Expand Down

0 comments on commit d3f4866

Please sign in to comment.