Skip to content

Commit ffa1852

Browse files
authored
Merge pull request #9 from opsworks-co/feat/allow-gitlab-s3-role-GetObjectAcl
feat: Allow GetObjectAcl on S3 to s3-access-role
2 parents 5f3a5eb + d30ee7b commit ffa1852

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In the above diagram, you can see the components and their relations (PostgreSQL
2828
|------|---------|
2929
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.36.0 |
3030
| <a name="provider_helm"></a> [helm](#provider\_helm) | 2.11.0 |
31-
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | 2.33.0 |
31+
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | 2.35.1 |
3232

3333
## Modules
3434

main.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,28 @@ 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 = "AllowPutObjectAclForGitlabRole"
145+
effect = "Allow"
146+
principals {
147+
type = "AWS"
148+
identifiers = [module.gitlab_role.iam_role_arn]
149+
}
150+
actions = ["s3:PutObjectAcl"]
151+
resources = ["arn:aws:s3:::${each.value}/*"]
152+
}
153+
154+
statement {
155+
sid = "AllowGetObjectAclForGitlabRole"
156+
effect = "Allow"
157+
principals {
158+
type = "AWS"
159+
identifiers = [module.gitlab_role.iam_role_arn]
160+
}
161+
actions = ["s3:GetObjectAcl"]
162+
resources = ["arn:aws:s3:::${each.value}/*"]
163+
}
142164
}
143165

144166
module "s3_bucket" {

0 commit comments

Comments
 (0)