Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Firewall Parameter Error - Fixed #572

Merged
merged 13 commits into from
Apr 28, 2023
2 changes: 1 addition & 1 deletion bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ module network './network.bicep' = if (custom_vnet) {
ingressApplicationGateway: ingressApplicationGateway
vnetAppGatewaySubnetAddressPrefix: vnetAppGatewaySubnetAddressPrefix
azureFirewalls: azureFirewalls
azureFirewallsSku: azureFirewallSku
azureFirewallSku: azureFirewallSku
vnetFirewallSubnetAddressPrefix: vnetFirewallSubnetAddressPrefix
vnetFirewallManagementSubnetAddressPrefix: vnetFirewallManagementSubnetAddressPrefix
privateLinks: privateLinks
Expand Down
4 changes: 2 additions & 2 deletions bicep/network.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ param networkSecurityGroups bool = true

//Firewall
param azureFirewalls bool = false
param azureFirewallsSku string = 'Basic'
param azureFirewallsManagementSeperation bool = azureFirewalls && azureFirewallsSku=='Basic'
param azureFirewallSku string = 'Basic'
param azureFirewallsManagementSeperation bool = azureFirewalls && azureFirewallSku=='Basic'
param vnetFirewallSubnetAddressPrefix string = ''
param vnetFirewallManagementSubnetAddressPrefix string = ''

Expand Down
4 changes: 2 additions & 2 deletions helper/src/components/deployTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export default function DeployTab({ defaults, updateFn, tabValues, invalidArray,
]})
}),
...(net.afw && { azureFirewalls: true, ...(addons.certMan && {certManagerFW: true}), ...(net.vnet_opt === "custom" && defaults.net.vnetFirewallSubnetAddressPrefix !== net.vnetFirewallSubnetAddressPrefix && { vnetFirewallSubnetAddressPrefix: net.vnetFirewallSubnetAddressPrefix }) }),
...(net.afw && net.azureFirewallsSku !== defaults.net.azureFirewallsSku && { azureFirewallsSku: net.azureFirewallsSku}),
...(net.afw && net.vnetFirewallManagementSubnetAddressPrefix !== defaults.net.vnetFirewallManagementSubnetAddressPrefix && net.azureFirewallsSku==="Basic" && { vnetFirewallManagementSubnetAddressPrefix: net.vnetFirewallManagementSubnetAddressPrefix}),
...(net.afw && net.azureFirewallSku !== defaults.net.azureFirewallSku && { azureFirewallSku: net.azureFirewallSku}),
...(net.afw && net.vnetFirewallManagementSubnetAddressPrefix !== defaults.net.vnetFirewallManagementSubnetAddressPrefix && net.azureFirewallSku==="Basic" && { vnetFirewallManagementSubnetAddressPrefix: net.vnetFirewallManagementSubnetAddressPrefix}),
...(net.vnet_opt === "custom" && net.vnetprivateend && {
privateLinks: true,
...(addons.csisecret === 'akvNew' && deploy.keyVaultIPAllowlist && apiips_array.length > 0 && {keyVaultIPAllowlist: apiips_array }),
Expand Down
6 changes: 3 additions & 3 deletions helper/src/components/networkTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ export default function NetworkTab ({ defaults, tabValues, updateFn, invalidArra
onChange={(ev, v) => updateFn("afw", v)}
label="Implement Azure Firewall & UDR next hop" />

{net.azureFirewallsSku==='Basic' &&
{net.azureFirewallSku==='Basic' &&
<MessageBar styles={{ root: { marginLeft: '50px', width:'500px', marginTop: '10px !important'}}} messageBarType={MessageBarType.warning}>Basic SKU is currently a preview service <Link href="https://learn.microsoft.com/en-gb/azure/firewall/deploy-firewall-basic-portal-policy#prerequisites">(*preview)</Link></MessageBar>
}
<Dropdown
styles={{ root: { marginLeft: '50px', width: '200px', marginTop: '10 !important' } }}
disabled={!net.afw}
label="Firewall SKU"
onChange={(ev, { key }) => updateFn("azureFirewallsSku", key)} selectedKey={net.azureFirewallsSku}
onChange={(ev, { key }) => updateFn("azureFirewallSku", key)} selectedKey={net.azureFirewallSku}
options={[
{ key: 'Basic', text: 'Basic' },
{ key: 'Standard', text: 'Standard' },
Expand Down Expand Up @@ -450,7 +450,7 @@ function CustomVNET({ net, addons, updateFn, invalidArray }) {
</Stack.Item>

<Stack.Item style={{ marginLeft: "20px"}}>
<TextField prefix="Cidr" disabled={!net.afw || net.azureFirewallsSku!=='Basic'} label="Azure Firewall management subnet" onChange={(ev, val) => updateFn("vnetFirewallManagementSubnetAddressPrefix", val)} value={net.afw ? (net.azureFirewallsSku==='Basic' ? net.vnetFirewallManagementSubnetAddressPrefix : 'Management subnet for Basic SKU') : "No Firewall requested"} />
<TextField prefix="Cidr" disabled={!net.afw || net.azureFirewallSku!=='Basic'} label="Azure Firewall management subnet" onChange={(ev, val) => updateFn("vnetFirewallManagementSubnetAddressPrefix", val)} value={net.afw ? (net.azureFirewallSku==='Basic' ? net.vnetFirewallManagementSubnetAddressPrefix : 'Management subnet for Basic SKU') : "No Firewall requested"} />
</Stack.Item>

<Stack.Item style={{ marginLeft: "20px"}}>
Expand Down
2 changes: 1 addition & 1 deletion helper/src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
"net": {
"vnetFirewallManagementSubnetAddressPrefix": "10.240.51.0/26",
"azureFirewallsSku": "Standard",
"azureFirewallSku": "Standard",
"maxPods": 30,
"cniDynamicIpAllocation": false,
"networkPluginMode": false,
Expand Down