mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-27 20:01:06 +01:00
feat: Allow enable/disable of EKS pod identity for the Karpenter controller (#2902)
* Made EKS pod identities for the controller role toggleable * Switched the variable to the singular form --------- Co-authored-by: Tyler Culp <tyler.culp@polestardefense.com>
This commit is contained in:
@@ -22,15 +22,19 @@ data "aws_iam_policy_document" "controller_assume_role" {
|
||||
count = local.create_iam_role ? 1 : 0
|
||||
|
||||
# Pod Identity
|
||||
statement {
|
||||
actions = [
|
||||
"sts:AssumeRole",
|
||||
"sts:TagSession",
|
||||
]
|
||||
dynamic "statement" {
|
||||
for_each = var.enable_pod_identity ? [1] : []
|
||||
|
||||
principals {
|
||||
type = "Service"
|
||||
identifiers = ["pods.eks.amazonaws.com"]
|
||||
content {
|
||||
actions = [
|
||||
"sts:AssumeRole",
|
||||
"sts:TagSession",
|
||||
]
|
||||
|
||||
principals {
|
||||
type = "Service"
|
||||
identifiers = ["pods.eks.amazonaws.com"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user