Skip to content

Commit

Permalink
fix(iam): starting from 2025 amazon requires explicit auth when resto…
Browse files Browse the repository at this point in the history
  • Loading branch information
moleus committed Nov 26, 2024
1 parent 3fcb725 commit f89e809
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ data "aws_iam_policy_document" "ebs_controller_policy" {
]
}

# https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues/2190
statement {
effect = "Allow"

resources = [
"arn:${var.arn_format}:ec2:*:*:snapshot/*",
]

actions = ["ec2:CreateVolume"]
}

statement {
effect = "Allow"

Expand Down Expand Up @@ -163,4 +174,4 @@ module "ebs_controller_role" {
role_policy_arns = concat([aws_iam_policy.ebs_controller_policy.arn], var.additional_iam_policies_arns)
oidc_fully_qualified_subjects = ["system:serviceaccount:${var.namespace}:${local.controller_name}"]
tags = var.tags
}
}

0 comments on commit f89e809

Please sign in to comment.