-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirewall.tf
30 lines (26 loc) · 836 Bytes
/
firewall.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Azure Firewall
resource "azurerm_firewall" "fire-wall" {
name = "myFirewall"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku_name = "AZFW_VNet"
sku_tier = "Standard"
}
resource "azurerm_firewall_application_rule_collection" "deny_external_to_subnet2" {
name = "testcollection"
azure_firewall_name = azurerm_firewall.fire-wall.name
resource_group_name = azurerm_resource_group.rg.name
priority = 100
action = "Deny"
rule {
name = "blockExternalToSubnet2"
source_addresses = ["*"] # Block all external traffic
target_fqdns = [
"*.azurewebsites.net",
]
protocol {
port = "443"
type = "Https"
}
}
}