File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -91,13 +91,13 @@ resource "aws_security_group_rule" "cluster_https_worker_ingress" {
9191}
9292
9393resource "aws_security_group_rule" "cluster_private_access_cidrs_source" {
94- count = var. create_eks && var. cluster_create_endpoint_private_access_sg_rule && var. cluster_endpoint_private_access && var. cluster_endpoint_private_access_cidrs != null ? 1 : 0
94+ for_each = var. create_eks && var. cluster_create_endpoint_private_access_sg_rule && var. cluster_endpoint_private_access && var. cluster_endpoint_private_access_cidrs != null ? toset (var . cluster_endpoint_private_access_cidrs ) : []
9595 description = " Allow private K8S API ingress from custom CIDR source."
9696 type = " ingress"
9797 from_port = 443
9898 to_port = 443
9999 protocol = " tcp"
100- cidr_blocks = var . cluster_endpoint_private_access_cidrs
100+ cidr_blocks = [ each . value ]
101101
102102 security_group_id = aws_eks_cluster. this [0 ]. vpc_config [0 ]. cluster_security_group_id
103103}
You can’t perform that action at this time.
0 commit comments