Skip to content

Commit

Permalink
fix: Remove Public ECR permissions from repository template permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Nov 27, 2024
1 parent 124c139 commit 23902b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.1
rev: v1.96.2
hooks:
- id: terraform_fmt
- id: terraform_wrapper_module_for_each
Expand Down
21 changes: 0 additions & 21 deletions modules/repository-template/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,27 +117,6 @@ data "aws_iam_policy_document" "repository" {
}
}

dynamic "statement" {
for_each = length(var.repository_read_write_access_arns) > 0 ? [var.repository_read_write_access_arns] : []

content {
sid = "ReadWrite"

principals {
type = "AWS"
identifiers = statement.value
}

actions = [
"ecr-public:BatchCheckLayerAvailability",
"ecr-public:CompleteLayerUpload",
"ecr-public:InitiateLayerUpload",
"ecr-public:PutImage",
"ecr-public:UploadLayerPart",
]
}
}

dynamic "statement" {
for_each = var.repository_policy_statements

Expand Down

0 comments on commit 23902b4

Please sign in to comment.