Skip to content

Commit

Permalink
update(config/cluster): adjust iam role for autoscaler
Browse files Browse the repository at this point in the history
Signed-off-by: Aldo Lacuku <[email protected]>
  • Loading branch information
alacuku committed Jul 17, 2024
1 parent 37f76fa commit 09fe0e4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions config/clusters/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,27 @@ data "aws_iam_policy_document" "cluster_autoscaler_policy_doc" {
statement {
effect = "Allow"
resources = ["*"]

actions = [
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeAutoScalingInstances",
"autoscaling:DescribeLaunchConfigurations",
"autoscaling:DescribeTags",
"autoscaling:DescribeScalingActivities",
"ec2:DescribeImages",
"ec2:DescribeInstanceTypes",
"ec2:DescribeLaunchTemplateVersions",
"ec2:GetInstanceTypesFromInstanceRequirements",
"eks:DescribeNodegroup",
]
}

statement {
effect = "Allow"
resources = ["*"]

actions = [
"autoscaling:SetDesiredCapacity",
"autoscaling:TerminateInstanceInAutoScalingGroup",
"ec2:DescribeLaunchTemplateVersions"
]
}
}
Expand Down

0 comments on commit 09fe0e4

Please sign in to comment.