-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
52 lines (46 loc) · 1.43 KB
/
main.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=2.63.0"
}
}
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "rg01" {
name = "azfw-resources"
location = "East US"
}
resource "azurerm_virtual_network" "vnet01" {
name = "vnet-azfw"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.rg01.location
resource_group_name = azurerm_resource_group.rg01.name
}
resource "azurerm_subnet" "sn01vn01" {
name = "AzureFirewallSubnet"
resource_group_name = azurerm_resource_group.rg01.name
virtual_network_name = azurerm_virtual_network.vnet01.name
address_prefixes = ["10.0.1.0/24"]
}
resource "azurerm_public_ip" "pip01" {
name = "pip-azfw"
location = azurerm_resource_group.rg01.location
resource_group_name = azurerm_resource_group.rg01.name
allocation_method = "Static"
sku = "Standard"
}
resource "azurerm_firewall" "azfw" {
name = "testfirewall"
location = azurerm_resource_group.rg01.location
resource_group_name = azurerm_resource_group.rg01.name
sku_name = "AZFW_VNet"
sku_tier = "Standard"
ip_configuration {
name = "configuration"
subnet_id = azurerm_subnet.sn01vn01.id
public_ip_address_id = azurerm_public_ip.pip01.id
}
}