Skip to content

Commit

Permalink
csi s3 in add list
Browse files Browse the repository at this point in the history
  • Loading branch information
sohanyadav committed Jul 30, 2024
1 parent e6523f1 commit 5206c79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module "opszero-eks" {
efs_enabled = false
#csi
s3_csi_driver_enabled = false
csi_bucket_names = ["test-6647373dd"] #name of s3
s3_csi_bucket_names = ["test-6647373dd"] #name of s3
}

module "helm-common" {
Expand Down
4 changes: 2 additions & 2 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ resource "aws_iam_policy" "s3_policy" {
Action = [
"s3:ListBucket"
],
Resource = [for bucket in var.csi_bucket_names : "arn:aws:s3:::$bucket"]
Resource = [for bucket in var.s3_csi_bucket_names : "arn:aws:s3:::$bucket"]
},
{
Sid = "MountpointFullObjectAccess",
Expand All @@ -411,7 +411,7 @@ resource "aws_iam_policy" "s3_policy" {
"s3:AbortMultipartUpload",
"s3:DeleteObject",
],
Resource = [for bucket in var.csi_bucket_names : "arn:aws:s3:::$bucket/*"]
Resource = [for bucket in var.s3_csi_bucket_names : "arn:aws:s3:::$bucket/*"]
},
],
})
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ variable "s3_csi_driver_enabled" {
default = false
}

variable "csi_bucket_names" {
variable "s3_csi_bucket_names" {
description = "The name of the S3 bucket for the CSI driver"
type = list(string)
default = [""]
Expand Down

0 comments on commit 5206c79

Please sign in to comment.