Skip to content

Commit

Permalink
Add support for availability zones for azure firewall
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasshah7 committed May 8, 2019
1 parent d772ea5 commit 40beed0
Show file tree
Hide file tree
Showing 8 changed files with 534 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
"x-ms-examples":{
"Get Azure Firewall":{
"$ref":"./examples/AzureFirewallGet.json"
},
"Get Azure Firewall With Zones":{
"$ref":"./examples/AzureFirewallGetWithZones.json"
}
}
},
Expand Down Expand Up @@ -180,6 +183,9 @@
"x-ms-examples":{
"Create Azure Firewall":{
"$ref":"./examples/AzureFirewallPut.json"
},
"Create Azure Firewall With Zones":{
"$ref":"./examples/AzureFirewallPutWithZones.json"
}
},
"x-ms-long-running-operation": true,
Expand Down Expand Up @@ -357,6 +363,13 @@
"$ref": "#/definitions/AzureFirewallPropertiesFormat",
"description": "Properties of the azure firewall."
},
"zones":{
"type":"array",
"items":{
"type":"string"
},
"description":"A list of availability zones denoting where the resource needs to come from."
},
"etag":{
"type":"string",
"readOnly":true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"type":"Microsoft.Network/azureFirewallFqdnTags",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"location":"West US",
"zones":[],
"tags":{
"key1":"value1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"type":"Microsoft.Network/azureFirewalls",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"location":"West US",
"zones":[],
"tags":{
"key1":"value1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"parameters":{
"api-version": "2019-04-01",
"subscriptionId":"subid",
"resourceGroupName":"rg1",
"azureFirewallName":"azurefirewall"
},
"responses":{
"200":{
"body":{
"name":"azurefirewall",
"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewall",
"type":"Microsoft.Network/azureFirewalls",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"location":"West US 2",
"zones":["1","2","3"],
"tags":{
"key1":"value1"
},
"properties":{
"provisioningState":"Succeeded",
"threatIntelMode": "Alert",
"ipConfigurations":[
{
"name":"azureFirewallIpConfiguration",
"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azurefirewallgw/ipConfigurations/azureFirewallIpConfiguration",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"properties":{
"provisioningState":"Succeeded",
"privateIPAddress":"10.0.0.0",
"subnet":{
"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"
},
"publicIPAddress":{
"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"
}
}
}
],
"applicationRuleCollections":[
{
"name":"apprulecoll",
"properties":{
"priority":110,
"action":{
"type": "Deny"
},
"rules":[
{
"name":"rule1",
"description":"Deny inbound rule",
"protocols":[
{
"protocolType":"Https",
"port":443
}
],
"targetFqdns":[
"www.test.com"
],
"sourceAddresses":[
"216.58.216.164",
"10.0.0.0/24"
]
}
]
}
}
],
"natRuleCollections":[
{
"name":"natrulecoll",
"properties":{
"priority":112,
"action":{
"type":"Dnat"
},
"rules":[
{
"name":"DNAT-HTTPS-traffic",
"description":"D-NAT all outbound web traffic for inspection",
"sourceAddresses":[
"*"
],
"destinationAddresses":[
"1.2.3.4"
],
"destinationPorts":[
"443"
],
"protocols":[
"TCP"
],
"translatedAddress": "1.2.3.5",
"translatedPort": "8443"
}
]
}
}
],
"networkRuleCollections":[
{
"name":"netrulecoll",
"properties":{
"priority":112,
"action":{
"type": "Deny"
},
"rules":[
{
"name":"L4-traffic",
"description":"Block traffic based on source IPs and ports",
"sourceAddresses":[
"192.168.1.1-192.168.1.12",
"10.1.4.12-10.1.4.255"
],
"destinationPorts":[
"443-444",
"8443"
],
"destinationAddresses":[
"*"
],
"protocols":[
"TCP"
]
}
]
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"type":"Microsoft.Network/azureFirewalls",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"location":"West US",
"zones":[],
"tags":{
"key1":"value1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"type":"Microsoft.Network/azureFirewalls",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"location":"West US",
"zones":[],
"tags":{
"key1":"value1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"tags":{
"key1":"value1"
},
"location":"West US",
"zones":[],
"properties":{
"threatIntelMode": "Alert",
"ipConfigurations":[
Expand Down Expand Up @@ -126,6 +128,7 @@
"type":"Microsoft.Network/azureFirewalls",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"location":"West US",
"zones":[],
"tags":{
"key1":"value1"
},
Expand Down Expand Up @@ -251,6 +254,7 @@
"type":"Microsoft.Network/azureFirewalls",
"etag":"w/\\00000000-0000-0000-0000-000000000000\\",
"location":"West US",
"zones":[],
"tags":{
"key1":"value1"
},
Expand Down
Loading

0 comments on commit 40beed0

Please sign in to comment.