diff --git a/modules/eks/main.tf b/modules/eks/main.tf index e482c58..40c8fa7 100644 --- a/modules/eks/main.tf +++ b/modules/eks/main.tf @@ -1,6 +1,6 @@ resource "aws_eks_cluster" "this" { name = var.cluster_name - role_arn = aws_iam_role.example.arn + role_arn = aws_iam_role.this.arn count = var.create_eks ? 1 : 0 version = var.cluster_version @@ -17,8 +17,8 @@ resource "aws_eks_cluster" "this" { # Ensure that IAM Role permissions are created before and deleted after EKS Cluster handling. # Otherwise, EKS will not be able to properly delete EKS managed EC2 infrastructure such as Security Groups. depends_on = [ - aws_iam_role_policy_attachment.example-AmazonEKSClusterPolicy, - aws_iam_role_policy_attachment.example-AmazonEKSVPCResourceController, + aws_iam_role_policy_attachment.AmazonEKSClusterPolicy, + aws_iam_role_policy_attachment.AmazonEKSVPCResourceController, ] }