diff --git a/modules/aws/EKS-Cluster/iam_role.tf b/modules/aws/EKS-Cluster/iam_role.tf index b9753b7..60477f3 100644 --- a/modules/aws/EKS-Cluster/iam_role.tf +++ b/modules/aws/EKS-Cluster/iam_role.tf @@ -313,8 +313,30 @@ resource "aws_iam_policy" "cluster_loadbalancer_policy" { } }, { - Effect : "Allow", - Action : [ + "Effect" : "Allow", + "Action" : [ + "elasticloadbalancing:AddTags" + ], + "Resource" : [ + "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*", + "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*", + "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*" + ], + "Condition" : { + "StringEquals" : { + "elasticloadbalancing:CreateAction" : [ + "CreateTargetGroup", + "CreateLoadBalancer" + ] + }, + "Null" : { + "aws:RequestTag/elbv2.k8s.aws/cluster" : "false" + } + } + }, + { + "Effect" : "Allow", + "Action" : [ "elasticloadbalancing:RegisterTargets", "elasticloadbalancing:DeregisterTargets" ],