-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.bicep
88 lines (84 loc) · 2.65 KB
/
main.bicep
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
86
87
88
targetScope = 'resourceGroup'
// Define parameters for locations and other settings
param location string = 'uksouth'
// Deploy the network module for UK South
module networkSouth 'NetworkModule.bicep' = {
name: 'networkSouthDeployment'
params: {
location: location
hubName: 'vnet_south_hub'
hubAddressSpace: '10.0.0.0/16'
hubSubnets: [
{ name: 'AzureFirewallSubnet', cidr: '10.0.0.0/27' }
{ name: 'AzureBastionSubnet', cidr: '10.0.0.32/27' }
{ name: 'Security', cidr: '10.0.1.0/24' }
{ name: 'GatewaySubnet', cidr: '10.0.255.0/27' }
]
spokes: [
{
name: 'vnet_south_spoke1'
addressSpace: '10.1.0.0/16'
subnets: [
{ name: 'Virtual_Machines', cidr: '10.1.0.0/24' }
{ name: 'south_subnet1', cidr: '10.1.1.0/24' }
{ name: 'Data', cidr: '10.1.2.0/24' }
]
}
{
name: 'vnet_south_spoke2'
addressSpace: '10.2.0.0/16'
subnets: [
{ name: 'Virtual_Machines', cidr: '10.2.0.0/24' }
{ name: 'south_subnet2', cidr: '10.2.1.0/24' }
{ name: 'Data', cidr: '10.2.2.0/24' }
]
}
]
}
}
// Deploy the network module for UK West
module networkWest 'NetworkModule.bicep' = {
name: 'networkWestDeployment'
params: {
location: 'ukwest'
hubName: 'vnet_west_hub'
hubAddressSpace: '172.16.0.0/16'
hubSubnets: [
{ name: 'AzureFirewallSubnet', cidr: '172.16.0.0/27' }
{ name: 'AzureBastionSubnet', cidr: '172.16.0.32/27' }
{ name: 'Security', cidr: '172.16.1.0/24' }
{ name: 'GatewaySubnet', cidr: '172.16.255.0/27' }
]
spokes: [
{
name: 'vnet_west_spoke1'
addressSpace: '172.17.0.0/16'
subnets: [
{ name: 'Virtual_Machines', cidr: '172.17.0.0/24' }
{ name: 'west_subnet1', cidr: '172.17.1.0/24' }
{ name: 'Data', cidr: '172.17.2.0/24' }
]
}
{
name: 'vnet_west_spoke2'
addressSpace: '172.18.0.0/16'
subnets: [
{ name: 'Virtual_Machines', cidr: '172.18.0.0/24' }
{ name: 'west_subnet2', cidr: '172.18.1.0/24' }
{ name: 'Data', cidr: '172.18.2.0/24' }
]
}
]
}
}
// Deploy the ExpressRoute Gateway for UK South
module expressRouteGatewaySouth 'ExpressRouteGatewayModule.bicep' = {
name: 'expressRouteGatewaySouthDeployment'
params: {
location: location
gatewayName: 'erGatewaySouth'
virtualNetworkName: 'vnet_south_hub'
publicIpName: 'erGatewaySouthPublicIP'
skuName: 'VpnGw1' // Ensure this matches the updated SKU
}
}