Skip to content

Commit 033e178

Browse files
mrzarquonroboquat
authored andcommitted
Last tidying around #12964
Typos in policy declarations ```release-note [AWS Infra] Terraform code updated to create correct policies for S3 buckets ```
1 parent d7ec736 commit 033e178

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

install/infra/modules/eks/storage.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ data "aws_iam_policy_document" "s3_policy" {
3131
"s3:DeleteObject",
3232
"s3:AbortMultipartUpload"
3333
]
34-
resources = [aws_s3_bucket.gitpod-storage[count.index].arn]
34+
resources = ["${aws_s3_bucket.gitpod-storage[count.index].arn}/*"]
3535
effect = "Allow"
3636
}
3737
statement {
@@ -45,14 +45,14 @@ data "aws_iam_policy_document" "s3_policy" {
4545

4646
resource "aws_iam_policy" "policy" {
4747
count = var.create_external_storage ? 1 : 0
48-
name = "spolicy-${var.cluster_name}"
48+
name = "policy-${var.cluster_name}"
4949
description = "Gitpod ${var.cluster_name} object storage bucket policy"
5050
policy = data.aws_iam_policy_document.s3_policy[0].json
5151
}
5252

5353
resource "aws_iam_user" "bucket_storage" {
5454
count = var.create_external_storage ? 1 : 0
55-
name = "suser-${var.cluster_name}"
55+
name = "user-${var.cluster_name}"
5656

5757
}
5858

@@ -102,7 +102,7 @@ data "aws_iam_policy_document" "s3_policy_registry" {
102102
"s3:DeleteObject",
103103
"s3:AbortMultipartUpload"
104104
]
105-
resources = [ws_s3_bucket.gitpod-registry-backend[count.index].arn]
105+
resources = ["${aws_s3_bucket.gitpod-registry-backend[count.index].arn}/*"]
106106
effect = "Allow"
107107
}
108108
statement {

0 commit comments

Comments
 (0)