Skip to content

Commit 1ef222b

Browse files
authored
fix: Remove Public ECR permissions from repository template permissions (#51)
1 parent 124c139 commit 1ef222b

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.96.1
3+
rev: v1.96.2
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each

modules/repository-template/main.tf

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -117,27 +117,6 @@ data "aws_iam_policy_document" "repository" {
117117
}
118118
}
119119

120-
dynamic "statement" {
121-
for_each = length(var.repository_read_write_access_arns) > 0 ? [var.repository_read_write_access_arns] : []
122-
123-
content {
124-
sid = "ReadWrite"
125-
126-
principals {
127-
type = "AWS"
128-
identifiers = statement.value
129-
}
130-
131-
actions = [
132-
"ecr-public:BatchCheckLayerAvailability",
133-
"ecr-public:CompleteLayerUpload",
134-
"ecr-public:InitiateLayerUpload",
135-
"ecr-public:PutImage",
136-
"ecr-public:UploadLayerPart",
137-
]
138-
}
139-
}
140-
141120
dynamic "statement" {
142121
for_each = var.repository_policy_statements
143122

0 commit comments

Comments
 (0)