0

Having several azure firewalls running very high bills on simple developer subscriptions. Inside a azure vnet I don't think firewall necessary for every developer subscription? How to test of the firewall is up and running and if not unlink or delete them from the network, using scripts preferably?

vrao
  • 545
  • 2
  • 12
  • 33

1 Answers1

1

Here's a command to list all firewalls in a subscription:

az network firewall list --query "[].{Name:name, State:provisioningState}" --output table

You can check provisioning state like this:

az network firewall show --name MyFirewall --resource-group MyResourceGroup --query provisioningState

Here's how you delete the firewall:

az network firewall delete --name MyFirewall --resource-group MyResourceGroup
  • az network firewall list --query "[].{Name:name, State:provisioningState}" --output table, In this command does name refer to subscription name – vrao Jul 17 '23 at 14:44
  • No. It refers to firewall name. That's a literal value. If you'd like to specify the subscription you would do the following: ``` az network firewall list --subscription --query "[].{Name:name, State:provisioningState}" --output table ``` – nickdoesstuff Jul 17 '23 at 18:30