Skip to content

Commit 48bcb7f

Browse files
committed
Fix
1 parent 16417b0 commit 48bcb7f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Terraform/modules/eks/main.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ resource "aws_iam_role" "karpenter_controller" {
139139
]
140140
})
141141
}
142-
143142
resource "aws_iam_role_policy" "karpenter_controller" {
144143
name = "KarpenterControllerPolicy"
145144
role = aws_iam_role.karpenter_controller.id
@@ -180,6 +179,16 @@ resource "aws_iam_role_policy" "karpenter_controller" {
180179
"sqs:ReceiveMessage"
181180
]
182181
Resource = "*"
182+
},
183+
{
184+
Effect = "Allow"
185+
Action = "iam:CreateServiceLinkedRole"
186+
Resource = "*"
187+
Condition = {
188+
StringEquals = {
189+
"iam:AWSServiceName" = "spot.amazonaws.com"
190+
}
191+
}
183192
}
184193
]
185194
})

0 commit comments

Comments
 (0)