Skip to content

Commit ab30619

Browse files
hyderdevoncrouse
authored andcommitted
fix: missing lb rule doesn't allow explicit ingress from anywhere
Signed-off-by: Ali Mukadam <[email protected]>
1 parent 8b8a35e commit ab30619

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/network/rules.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ resource "oci_core_network_security_group_security_rule" "oke" {
133133
tonumber(lookup(each.value, "port", 0)) == local.apiserver_port,
134134
contains(var.control_plane_allowed_cidrs, local.anywhere),
135135
]),
136+
137+
# TCP ingress to internal load balancer from anywhere has been configured explicitly
138+
alltrue([
139+
contains(keys(var.allow_rules_internal_lb), each.key),
140+
]),
141+
142+
# TCP ingress to public load balancer from anywhere has been configured explicitly
143+
alltrue([
144+
contains(keys(var.allow_rules_public_lb), each.key),
145+
]),
136146
])
137147
error_message = "Unexpected open ingress rule: ${each.key}"
138148
}

0 commit comments

Comments
 (0)