Skip to content

Commit

Permalink
Last tidying around #12964
Browse files Browse the repository at this point in the history
Typos in policy declarations

```release-note
[AWS Infra] Terraform code updated to create correct policies for S3 buckets
```
  • Loading branch information
mrzarquon authored and roboquat committed Sep 22, 2022
1 parent d7ec736 commit 033e178
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install/infra/modules/eks/storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "aws_iam_policy_document" "s3_policy" {
"s3:DeleteObject",
"s3:AbortMultipartUpload"
]
resources = [aws_s3_bucket.gitpod-storage[count.index].arn]
resources = ["${aws_s3_bucket.gitpod-storage[count.index].arn}/*"]
effect = "Allow"
}
statement {
Expand All @@ -45,14 +45,14 @@ data "aws_iam_policy_document" "s3_policy" {

resource "aws_iam_policy" "policy" {
count = var.create_external_storage ? 1 : 0
name = "spolicy-${var.cluster_name}"
name = "policy-${var.cluster_name}"
description = "Gitpod ${var.cluster_name} object storage bucket policy"
policy = data.aws_iam_policy_document.s3_policy[0].json
}

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

}

Expand Down Expand Up @@ -102,7 +102,7 @@ data "aws_iam_policy_document" "s3_policy_registry" {
"s3:DeleteObject",
"s3:AbortMultipartUpload"
]
resources = [ws_s3_bucket.gitpod-registry-backend[count.index].arn]
resources = ["${aws_s3_bucket.gitpod-registry-backend[count.index].arn}/*"]
effect = "Allow"
}
statement {
Expand Down

0 comments on commit 033e178

Please sign in to comment.