@@ -30,6 +30,13 @@ locals {
3030 protocol = local.tcp_protocol, port = local.health_check_port, destination = local.worker_nsg_id, destination_type = local.rule_type_nsg,
3131 },
3232 },
33+
34+ local. pod_nsg_enabled ? {
35+ " Allow all egress from internal load balancers to pods" : {
36+ protocol = local.all_protocols, port = local.all_ports, destination = local.pod_nsg_id, destination_type = local.rule_type_nsg,
37+ },
38+ } : {},
39+
3340 var. enable_ipv6 ? {
3441 " Allow ICMPv6 egress from internal load balancers to worker nodes for path discovery" : {
3542 protocol = local.icmpv6_protocol, port = local.all_ports, destination = local.worker_nsg_id, destination_type = local.rule_type_nsg,
@@ -55,17 +62,27 @@ locals {
5562 protocol = local.udp_protocol, source_port_min = local.node_port_min, source_port_max = local.node_port_max, source = local.worker_nsg_id, source_type = local.rule_type_nsg, stateless = true
5663 },
5764
58- " Allow TCP egress from internal load balancers to workers for health checks" : {
59- protocol = local.tcp_protocol, destination_port_min = local.health_check_port, destination_port_max = local.health_check_port, destination = local.worker_nsg_id , destination_type = local.rule_type_nsg, stateless = true
65+ " Allow TCP egress from internal load balancers to pods for health checks" : {
66+ protocol = local.tcp_protocol, destination_port_min = local.health_check_port, destination_port_max = local.health_check_port, destination = local.pod_nsg_id , destination_type = local.rule_type_nsg, stateless = true
6067 },
61- " Allow TCP egress to internal load balancers from workers for health checks" : {
62- protocol = local.tcp_protocol, source_port_min = local.health_check_port, source_port_max = local.health_check_port, source = local.worker_nsg_id , source_type = local.rule_type_nsg, stateless = true
68+ " Allow TCP egress to internal load balancers from pods for health checks" : {
69+ protocol = local.tcp_protocol, source_port_min = local.health_check_port, source_port_max = local.health_check_port, source = local.pod_nsg_id , source_type = local.rule_type_nsg, stateless = true
6370 },
6471
6572 " Allow ICMP egress from internal load balancers to worker nodes for path discovery" : {
6673 protocol = local.icmp_protocol, port = local.all_ports, destination = local.worker_nsg_id, destination_type = local.rule_type_nsg,
6774 },
6875 },
76+
77+ local. pod_nsg_enabled ? {
78+ " Allow all egress from internal load balancers to pods" : {
79+ protocol = local.all_protocols, port = local.all_ports, destination = local.pod_nsg_id, destination_type = local.rule_type_nsg, stateless = true
80+ },
81+ " Allow all ingress from pods to internal load balancers" : {
82+ protocol = local.all_protocols, port = local.all_ports, source = local.pod_nsg_id, source_type = local.rule_type_nsg, stateless = true
83+ },
84+ } : {},
85+
6986 var. enable_ipv6 ? {
7087 " Allow ICMPv6 egress from internal load balancers to worker nodes for path discovery" : {
7188 protocol = local.icmpv6_protocol, port = local.all_ports, destination = local.worker_nsg_id, destination_type = local.rule_type_nsg,
0 commit comments