tests/functional/Microsoft.Network/azureFirewalls/deploy/deploy.json

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "location": {
            "type": "string"
        },
        "azureFirewallName": {
            "type": "string"
        },
        "azureFirewallTier": {
            "type": "string"
        },
        "vnetName": {
            "type": "string"
        },
        "vnetAddressSpace": {
            "type": "string"
        },
        "subnetAddressSpace": {
            "type": "string"
        },
        "publicIpAddressName": {
            "type": "string"
        },
        "zones": {
            "type": "array"
        }
    },
    "resources": [
        {
            "apiVersion": "2021-05-01",
            "type": "Microsoft.Network/publicIpAddresses",
            "name": "[parameters('publicIpAddressName')]",
            "location": "[parameters('location')]",
            "zones": "[parameters('zones')]",
            "sku": {
                "name": "Standard"
            },
            "properties": {
                "publicIPAllocationMethod": "Static"
            },
            "tags": {}
        },
        {
            "type": "Microsoft.Network/virtualNetworks",
            "name": "[parameters('vnetName')]",
            "location": "[parameters('location')]",
            "apiVersion": "2021-05-01",
            "properties": {
                "addressSpace": {
                    "addressPrefixes": [
                        "[parameters('vnetAddressSpace')]"
                    ]
                },
                "subnets": [
                    {
                        "name": "AzureFirewallSubnet",
                        "properties": {
                            "addressPrefix": "[parameters('subnetAddressSpace')]"
                        }
                    }
                ]
            },
            "tags": {}
        },
        {
            "apiVersion": "2021-05-01",
            "type": "Microsoft.Network/firewallPolicies",
            "resources": [],
            "properties": {
                "sku": {
                    "tier": "Premium"
                },
                "intrusionDetection": {
                    "mode": "Off"
                }
            },
            "name": "newfwpolicy",
            "location": "northeurope",
            "tags": {}
        },
        {
            "apiVersion": "2021-05-01",
            "type": "Microsoft.Network/azureFirewalls",
            "name": "[parameters('azureFirewallName')]",
            "location": "[parameters('location')]",
            "zones": "[parameters('zones')]",
            "dependsOn": [
                "[resourceId('Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]",
                "[resourceId('Microsoft.Network/virtualNetworks', parameters('vnetName'))]",
                "[resourceId('Microsoft.Network/firewallPolicies', 'newfwpolicy')]"
            ],
            "properties": {
                "ipConfigurations": [
                    {
                        "name": "[parameters('publicIpAddressName')]",
                        "properties": {
                            "subnet": {
                                "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), 'AzureFirewallSubnet')]"
                            },
                            "publicIpAddress": {
                                "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpAddressName'))]"
                            }
                        }
                    }
                ],
                "sku": {
                    "tier": "[parameters('azureFirewallTier')]"
                },
                "firewallPolicy": {
                    "id": "[resourceId('Microsoft.Network/firewallPolicies', 'newfwpolicy')]"
                }
            },
            "tags": {}
        }
    ]
}