Skip to content

Commit 274ca08

Browse files
author
Mykhailo Babych
committed
feat: Allow GetObjectAcl on S3 to s3-access-role
1 parent 5f3a5eb commit 274ca08

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,17 @@ data "aws_iam_policy_document" "s3_bucket_policy" {
139139
actions = ["s3:DeleteObject"]
140140
resources = ["arn:aws:s3:::${each.value}/*"]
141141
}
142+
143+
statement {
144+
sid = "AllowGetObjectAclForGitlabRole"
145+
effect = "Allow"
146+
principals {
147+
type = "AWS"
148+
identifiers = [module.gitlab_role.iam_role_arn]
149+
}
150+
actions = ["s3:GetObjectAcl"]
151+
resources = ["arn:aws:s3:::${each.value}/*"]
152+
}
142153
}
143154

144155
module "s3_bucket" {

0 commit comments

Comments
 (0)