No way to delete a Firewall Policy Rule Collection Group in Bicep/ARM #17990
Unanswered
ChristopherGLewis
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Use deployment stacks https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deployment-stacks?tabs=azure-powershell |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any way to delete an Rule Collection Group in ARM/Bicep??? - I've added an issue (#17989), but thought starting a discussion may help
I'm in the process of creating bicep templates for Azure Firewall Policies and have encountered what I consider a bug in the RP/API for Rule Collection Groups.
If I create an Azure Firewall Policy in code and add a rule collection group to it if I ever remove that rule collection group it does not get deleted and there's no way to delete it in Bicep/ARM.
The problem is that parent/child relationship of the Policy to Rule Collection Groups is only defined in the RCG, not the policy.
Create two RCGs
Remove RCG 1 - but there's no way to delete Rule1
Incremental vs Complete.
A potential solution is to use a complete Resource Group deployment; however, with the Azure Firewall, this becomes problematic since the Azure Firewall is required to be in the same Resource Group as the network it's in. I haven't looked at a separate RG just for policies, but that could be a solution, but not ideal.
Better Solution
A better solution would be to have the AzFWPolicy have a list of RGC's and have the removal of an RCG from that list result in that RCG being deleted. This is more logical since a RCG can't exist as an Azure object on its own.
Beta Was this translation helpful? Give feedback.
All reactions