Skip to content

Commit 7a6b115

Browse files
committed
fix: update auto mode variable references for IAM role policy attachments
1 parent c7240ff commit 7a6b115

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

iam.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ data "aws_iam_policy_document" "assume_role" {
1818

1919
statement {
2020
effect = "Allow"
21-
actions = concat(["sts:AssumeRole"], var.cluster_auto_mode_enabled ? ["sts:TagSession"] : [])
21+
actions = concat(["sts:AssumeRole"], local.auto_mode_enabled ? ["sts:TagSession"] : [])
2222

2323
principals {
2424
type = "Service"
@@ -100,7 +100,7 @@ resource "aws_iam_role_policy_attachment" "cluster_elb_service_role" {
100100
}
101101

102102
resource "aws_iam_role_policy_attachment" "auto_mode_policies" {
103-
count = var.cluster_auto_mode_enabled && local.create_eks_service_role ? length(local.auto_mode_policies) : 0
103+
count = local.auto_mode_enabled && local.create_eks_service_role ? length(local.auto_mode_policies) : 0
104104
policy_arn = element(local.auto_mode_policies, count.index)
105105
role = one(aws_iam_role.default[*].name)
106106
}

0 commit comments

Comments
 (0)