File tree 1 file changed +2
-2
lines changed
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" {
91
91
}
92
92
93
93
resource "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 ) : []
95
95
description = " Allow private K8S API ingress from custom CIDR source."
96
96
type = " ingress"
97
97
from_port = 443
98
98
to_port = 443
99
99
protocol = " tcp"
100
- cidr_blocks = var . cluster_endpoint_private_access_cidrs
100
+ cidr_blocks = [ each . value ]
101
101
102
102
security_group_id = aws_eks_cluster. this [0 ]. vpc_config [0 ]. cluster_security_group_id
103
103
}
You can’t perform that action at this time.
0 commit comments