Skip to content

Commit

Permalink
create eks istio cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusoh committed Nov 2, 2024
1 parent e511dfc commit f969221
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tf_aws_eks/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ resource "aws_iam_role_policy_attachment" "aws_load_balancer_controller_attach"
}

output "aws_load_balancer_controller_role_arn" {
value = aws_iam_role.aws_load_balancer_controller.arn
value = var.deploy_lb_controller ? aws_iam_role.aws_load_balancer_controller[0].arn : null
}

data "template_file" "iam_policy" {
Expand All @@ -117,9 +117,11 @@ resource "aws_iam_policy" "lb-controller" {
}

resource "aws_iam_role_policy_attachment" "lb-controller-policy" {
count = var.deploy_lb_controller ? 1 : 0
policy_arn = aws_iam_policy.lb-controller[0].arn
role = aws_iam_role.lb_controller_role.name
}

resource "aws_iam_role_policy_attachment" "eks-cluster-policy" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy"
role = aws_iam_role.eks_role.name
Expand Down

0 comments on commit f969221

Please sign in to comment.