Associate Azure Firewall Policy With a VNET Using Powershell or Azure CLI

Rafael de Jesus Medeiros 1 Reputation point
2021-11-04T16:43:27.247+00:00

I have a firewall policy, and I would like to associate it to a VNET via Powershell, Azure CLI or Terraform, right now the only option I found was via Azure portal only:

146517-2021-11-04-13-37-38-firewall-manager-microsoft-azu.png

I really need this to be scripted, I can't do that manually because we are using Terraform to automate this process. Do you have any ideas?

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
567 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,256 Reputation points Microsoft Employee
    2021-11-05T11:54:13.943+00:00

    @Rafael de Jesus Medeiros ,

    Associating a firewall policy to a VNET is similar to deploying a Firewall in the subscription.

    Use this document to create Azure Firewall with the created Policy in your VNET: https://learn.microsoft.com/en-us/azure/firewall/deploy-ps-policy

    Regards,
    Karthik Srinivas

    0 comments No comments