-
Notifications
You must be signed in to change notification settings - Fork 0
/
hub_spoke_topology.tf
86 lines (76 loc) · 2.64 KB
/
hub_spoke_topology.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Deploy Hub Virtual Network and subnets
module "hub_network" {
source = "./modules/hub_network"
providers = { azurerm = azurerm.connectivity }
hub_resource_group = var.hub_resource_group
hub_location = var.hub_location
hub_vnet_name = var.hub_vnet_name
hub_vnet_cidr = var.hub_vnet_cidr
gateway_subnet = var.gateway_subnet
firewall_subnet = var.firewall_subnet
bastion_subnet = var.bastion_subnet
}
# Deploy ER Gateway ~30min
module "er_gateway" {
source = "./modules/er_gateway"
depends_on = [
module.hub_network
]
providers = { azurerm = azurerm.connectivity }
hub_location = var.hub_location
gateway_subnet_id = module.hub_network.gateway_subnet_id
hub_resource_group = var.hub_resource_group
er_gateway_pip_name = var.er_gateway_pip_name
er_gateway_name = var.er_gateway_name
er_gateway_sku = var.er_gateway_sku
}
# Deploy VPN Gateway ~30min
module "vpn_gateway" {
source = "./modules/vpn_gateway"
depends_on = [
module.hub_network,
module.er_gateway
]
providers = { azurerm = azurerm.connectivity }
hub_location = var.hub_location
gateway_subnet_id = module.hub_network.gateway_subnet_id
hub_resource_group = var.hub_resource_group
vpn_gateway_pip_name = var.vpn_gateway_pip_name
vpn_gateway_name = var.vpn_gateway_name
vpn_gateway_sku = var.vpn_gateway_sku
}
# Deploy Azure Firewall ~30min
module "azure_firewall" {
source = "./modules/azure_firewall"
depends_on = [
module.hub_network
]
providers = { azurerm = azurerm.connectivity }
hub_location = var.hub_location
firewall_subnet_id = module.hub_network.firewall_subnet_id
hub_resource_group = var.hub_resource_group
firewall_pip_name = var.firewall_pip_name
firewall_name = var.firewall_name
firewall_sku_tier = var.firewall_sku_tier
}
# Deploy a Spoke network - Identity
module "spoke_network" {
source = "./modules/spoke_network"
depends_on = [
module.hub_network,
module.er_gateway,
module.vpn_gateway
]
providers = { azurerm.spoke = azurerm.identity
azurerm.connectivity = azurerm.connectivity }
spoke_location = var.identity_vnet_location
spoke_resource_group = var.identity_resource_group
spoke_vnet_name = var.identity_vnet_name
spoke_vnet_cidr = var.identity_vnet_cidr
hub_vnet_id = module.hub_network.hub_vnet_id
hub_resource_group = var.hub_resource_group
hub_vnet_name = var.hub_vnet_name
spoke_vnet_subnets = var.identity_vnet_subnets
spoke_udr_name = var.identity_udr_name
# spoke_udr_routes = var.identity_udr_routes
}