Azure / Azure/template-analyzer
[Built-in Rule] All Internet traffic should be routed via your deployed Azure Firewall
- Dominant language
- C#
- Stars
- 143
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
Azure policy: https://github.com/Azure/azure-policy/blob/master/built-in-policies/policyDefinitions/Network/ASC_All_Internet_traffic_should_be_routed_via_Azure_Firewall.json
``` javascript
{
"name": "Network_VirtualNetworks_RoutedViaAzureFirewall",
"description": "All Internet traffic should be routed via your deployed Azure Firewall",
"recommendation": "Restrict access to subnets with Azure Firewall or a supported next generation firewall",
"helpUri": "https://github.com/Azure/template-analyzer/docs/built-in-bpa-rules.md/#all-internet-traffic-should-be-routed-via-your-deployed-azure-firewall",
"evaluation": {
"resourceType": "Microsoft.Network/virtualNetworks",
"where": {
"count": {
"path": "properties.subnets[*]",
"where": {
"allOf": [
{
"count": {
"path": "ipConfigurations[*]",
"where": {
"path": "id",
"hasValue": false
}
},
"greaterOrEquals": 2
},
{
"path": "routeTable",
"exists": false
},
{
"not": {
"path": "name",
"in": [
"AzureBastionSubnet",
"GatewaySubnet"
]
}
}
]
}
},
"greater": 0
},
"evaluate": {
"resourceType": "Microsoft.Network/azureFirewalls",
"count": {
"path": "properties.ipConfigurations[*]",
"where": {
"field": "subnet.id",
"regex": "subnets/AzureFirewallSubnet$"
}
},
"equals": 1
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.