From fa355c2c8af84bf9b5676144cca70fdbdd7085da Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Wed, 21 Sep 2022 16:27:57 +0100 Subject: [PATCH] Last tidying around https://github.com/gitpod-io/gitpod/issues/12964 Typos in policy declarations ```release-note [AWS Infra] Terraform code updated to create correct policies for S3 buckets ``` --- install/infra/modules/eks/storage.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/infra/modules/eks/storage.tf b/install/infra/modules/eks/storage.tf index 59ea71a118f6a7..fe7b65db1e01a1 100644 --- a/install/infra/modules/eks/storage.tf +++ b/install/infra/modules/eks/storage.tf @@ -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 { @@ -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}" } @@ -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 {