Skip to content

Commit

Permalink
Added depends on to firewall.bicep
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethcarnes committed Feb 19, 2024
1 parent 237d2c2 commit 965fc41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 54 deletions.
9 changes: 9 additions & 0 deletions bicep/firewall.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ resource firewallPolicy 'Microsoft.Network/firewallPolicies@2023-06-01' = {
properties: {
threatIntelMode: 'Alert'
}
dependsOn: [
azureFirewall // Ensure firewall is deployed before policy
]
}

resource applicationRuleCollection 'Microsoft.Network/firewallPolicies/ruleCollectionGroups@2023-06-01' = {
Expand Down Expand Up @@ -121,6 +124,9 @@ resource applicationRuleCollection 'Microsoft.Network/firewallPolicies/ruleColle
}
]
}
dependsOn: [
firewallPolicy // Added to ensure policy is in place before rule collections are applied
]
}

resource networkRuleCollection 'Microsoft.Network/firewallPolicies/ruleCollectionGroups@2023-06-01' = {
Expand Down Expand Up @@ -158,6 +164,9 @@ resource networkRuleCollection 'Microsoft.Network/firewallPolicies/ruleCollectio
}
]
}
dependsOn: [
firewallPolicy // Ensures policy is ready before applying network rules
]
}

output firewallPublicIPAddress string = firewallPublicIP.properties.ipAddress
Expand Down
54 changes: 0 additions & 54 deletions scripts/# Streamlined script without the need to.ps1

This file was deleted.

0 comments on commit 965fc41

Please sign in to comment.