An Azure network security service that is used to protect Azure Virtual Network resources.
Hi Rina,
Based on what you've described, here are some pointers. I also think you would benefit from this blog: Put on resource failed with faulted reference resource.
- The most important aspect here is the provisioning state of your firewall, and of the firewall policy, which should both be Succeeded. This error doesn't only occur in your scenario. It appears when the resource you're changing, or any resource it references, is in a Failed state. It can also cascade: a failed firewall can leave its parent and child policies in a Failed state too.
- Yes. If a resource is in a Failed state, further operations on it, or on resources that depend on it, might fail. You need to restore it to Succeeded before making further changes. See Troubleshoot Azure Microsoft.Network failed provisioning state.
- It's important to differentiate between Azure Firewall (the compute) and Azure Firewall Policy (the rules attached to the firewall). According to the Azure Firewall FAQ, a Failed state means a configuration update failed on one or more backend instances. The firewall remains operational, but the configuration might be inconsistent. So you can't assume it's fully enforcing either the previous or the new policy version until the state is back to Succeeded.
- Yes. If you are running your changes via CI/CD jobs, you should be able to re-run them. Alternatively, restore the Succeeded state with a
PUToperation manually, using aGetfollowed by a Set:
Always run the Get before the Set. Running Set on its own overwrites the resource with default settings. Check every resource in the chain and fix the deepest dependency first, as running them in the wrong order will fail.Get-AzFirewallPolicy -Name "<policy>" -ResourceGroupName "<rg>" | Set-AzFirewallPolicy Get-AzFirewall -Name "<firewall>" -ResourceGroupName "<rg>" | Set-AzFirewall - I can't find documentation of an automatic retry. The FAQ says to retry the update until the provisioning state changes to Succeeded, so I'd plan for handling it yourself. Since your integration pushes rules programmatically, also make sure updates are serialised rather than run in parallel. The blog above mentions parallel IP Group updates as a known trigger for this error.
A small side note: I've experienced something similar when running changes to the firewall policy in parallel. The solution was to set parallelism to 1 on our CD job, so only one change is applied to the firewall at a time. Running changes sequentially avoids the conflicts that parallel updates cause.