Skip to content

Commit

Permalink
Update policies.tf
Browse files Browse the repository at this point in the history
Add functionality to interpolate resource arns to use local.partition instead of hardcoded value of "aws" to prevent breaking non-commercial use cases.
  • Loading branch information
mcamick authored Oct 22, 2024
1 parent 0773c17 commit 11b0af9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/iam-role-for-service-accounts-eks/policies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ data "aws_iam_policy_document" "ebs_csi" {

statement {
actions = ["ec2:CreateVolume"]
resources = ["arn:aws:ec2:*:*:volume/*"]
resources = ["arn:${local.partition}:ec2:*:*:volume/*"]

condition {
test = "StringLike"
Expand All @@ -213,7 +213,7 @@ data "aws_iam_policy_document" "ebs_csi" {

statement {
actions = ["ec2:CreateVolume"]
resources = ["arn:aws:ec2:*:*:volume/*"]
resources = ["arn:${local.partition}:ec2:*:*:volume/*"]

condition {
test = "StringLike"
Expand All @@ -235,7 +235,7 @@ data "aws_iam_policy_document" "ebs_csi" {

statement {
actions = ["ec2:CreateVolume"]
resources = ["arn:aws:ec2:*:*:snapshot/*"]
resources = ["arn:${local.partition}:ec2:*:*:snapshot/*"]
}

statement {
Expand Down

0 comments on commit 11b0af9

Please sign in to comment.