Skip to content

Commit 8987918

Browse files
authored
Merge pull request #13 from marcincuber/feat/karpenter-v1-policy-update
update karpenter controller policy for v1 support
2 parents 1240b63 + eefb438 commit 8987918

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

terraform/oidc-iam-policies.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,15 @@ data "aws_iam_policy_document" "karpenter_controller" {
409409
]
410410
}
411411

412+
condition {
413+
test = "StringEquals"
414+
variable = "aws:RequestTag/eks:eks-cluster-name"
415+
416+
values = [
417+
local.eks_cluster_name
418+
]
419+
}
420+
412421
condition {
413422
test = "StringEquals"
414423
variable = "ec2:CreateAction"
@@ -458,11 +467,21 @@ data "aws_iam_policy_document" "karpenter_controller" {
458467
]
459468
}
460469

470+
condition {
471+
test = "StringEqualsIfExists"
472+
variable = "aws:RequestTag/eks:eks-cluster-name"
473+
474+
values = [
475+
local.eks_cluster_name
476+
]
477+
}
478+
461479
condition {
462480
test = "ForAllValues:StringEquals"
463481
variable = "aws:TagKeys"
464482

465483
values = [
484+
"eks:eks-cluster-name",
466485
"karpenter.sh/nodeclaim",
467486
"Name"
468487
]

0 commit comments

Comments
 (0)