Skip to content

Commit

Permalink
Fixed subnet references
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethcarnes committed Feb 14, 2024
1 parent 0a1d679 commit 3fe53c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions bicep/firewall.bicep
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
param location string
param hubVnetName string
param firewallPrivateIp string = '10.0.0.4'
param firewallPublicIPName string = '${hubVnetName}-fw-pip'
param firewallMgmtPublicIPName string = '${hubVnetName}-fw-mgmt-pip'

resource firewallPublicIP 'Microsoft.Network/publicIPAddresses@2023-06-01' = {
name: '${hubVnetName}-fw-pip'
name: firewallPublicIPName
location: location
properties: {
publicIPAllocationMethod: 'Static'
}
}

resource firewallMgmtPublicIP 'Microsoft.Network/publicIPAddresses@2023-06-01' = {
name: '${hubVnetName}-fw-mgmt-pip'
name: firewallMgmtPublicIPName
location: location
properties: {
publicIPAllocationMethod: 'Static'
Expand All @@ -21,6 +23,10 @@ resource firewallMgmtPublicIP 'Microsoft.Network/publicIPAddresses@2023-06-01' =
resource azureFirewall 'Microsoft.Network/azureFirewalls@2023-06-01' = {
name: '${hubVnetName}-firewall'
location: location
dependsOn: [
firewallPublicIP
firewallMgmtPublicIP
]
properties: {
sku: {
name: 'AZFW_VNet'
Expand Down
6 changes: 3 additions & 3 deletions bicep/vnets.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ param hubSubnet1Prefix string = '10.0.1.0/24'
param hubSubnet2Prefix string = '10.0.2.0/24'
param spokeVnetDetails array
param AzureFirewallSubnet string = '10.0.0.0/24'
param AzureFirewallManagementSubnetPrefix string = '10.0.0.64/26' // Example subnet prefix for management
param AzureFirewallManagementSubnet string = '10.0.0.64/26'

resource hubVnet 'Microsoft.Network/virtualNetworks@2021-02-01' = {
name: hubVnetName
Expand All @@ -21,9 +21,9 @@ resource hubVnet 'Microsoft.Network/virtualNetworks@2021-02-01' = {
}
}
{
name: 'AzureFirewallManagementSubnet' // Define the management subnet
name: 'AzureFirewallManagementSubnet'
properties: {
addressPrefix: AzureFirewallManagementSubnetPrefix
addressPrefix: AzureFirewallManagementSubnet
}
}
{
Expand Down

0 comments on commit 3fe53c8

Please sign in to comment.