Skip to content

Commit

Permalink
Adding conditional statements for subnet references (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
oZakari authored Mar 21, 2024
1 parent 2da7f4f commit 9e5964a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ resource resBastionLock 'Microsoft.Authorization/locks@2020-05-01' = if (parAzBa
}
}

resource resGatewaySubnetRef 'Microsoft.Network/virtualNetworks/subnets@2023-02-01' existing = {
resource resGatewaySubnetRef 'Microsoft.Network/virtualNetworks/subnets@2023-02-01' existing = if (parVpnGatewayEnabled || parExpressRouteGatewayEnabled ) {
parent: resHubVnet
name: 'GatewaySubnet'
}
Expand Down Expand Up @@ -799,7 +799,7 @@ resource resVirtualNetworkGatewayLock 'Microsoft.Authorization/locks@2020-05-01'
}
}]

resource resAzureFirewallSubnetRef 'Microsoft.Network/virtualNetworks/subnets@2023-02-01' existing = {
resource resAzureFirewallSubnetRef 'Microsoft.Network/virtualNetworks/subnets@2023-02-01' existing = if (parAzFirewallEnabled) {
parent: resHubVnet
name: 'AzureFirewallSubnet'
}
Expand Down

0 comments on commit 9e5964a

Please sign in to comment.