Skip to content

Commit f03a0af

Browse files
committed
OCPBUGS-11796: azure: skip NSG creation when BYO vnet
In an install where users bring their networks they also bring their own NSGs. However, the installer still creates NSG. In Azure environments using the rule [1] below, users are prohibited from installing cluster, as the apiserver_in rule has the rule set as 0.0.0.0. Having a rule in place where the users could define this before install would allow them to set this connectivity without having the inbound access. [1] - Rule: Network Security Groups shall not allow rule with 0.0.0.0/Any Source/Destination IP Addresses - Custom Deny
1 parent 978b35e commit f03a0af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

data/data/azure/vnet/nsg.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ resource "azurerm_subnet_network_security_group_association" "worker" {
2020
}
2121

2222
resource "azurerm_network_security_rule" "apiserver_in" {
23+
count = var.azure_preexisting_network ? 0 : 1
2324
name = "apiserver_in"
2425
priority = 101
2526
direction = "Inbound"

0 commit comments

Comments
 (0)