diff --git a/cluster.tf b/cluster.tf index 13d38a09a7..1a2fc47dc9 100644 --- a/cluster.tf +++ b/cluster.tf @@ -77,7 +77,7 @@ resource "aws_security_group_rule" "cluster_egress_internet" { } resource "aws_security_group_rule" "cluster_https_worker_ingress" { - count = var.cluster_create_security_group && var.create_eks ? 1 : 0 + count = var.cluster_create_security_group && var.create_eks && var.worker_create_security_group ? 1 : 0 description = "Allow pods to communicate with the EKS cluster API." protocol = "tcp" security_group_id = local.cluster_security_group_id