-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathhub-and-spoke-vnet.tfvars
325 lines (309 loc) · 15.9 KB
/
hub-and-spoke-vnet.tfvars
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
/*
--- Built-in Replacements ---
This file contains built-in replacements to avoid repeating the same hard-coded values.
Replacements are denoted by the dollar-dollar curly braces token (e.g. $${starter_location_01}). The following details each built-in replacemnets that you can use:
`starter_location_01`: This the primary an Azure location sourced from the `starter_locations` variable. This can be used to set the location of resources.
`starter_location_02` to `starter_location_10`: These are the secondary Azure locations sourced from the `starter_locations` variable. This can be used to set the location of resources.
`starter_location_01_availability_zones` to `starter_location_10_availability_zones`: These are the availability zones for the Azure locations sourced from the `starter_locations` variable. This can be used to set the availability zones of resources.
`starter_location_01_virtual_network_gateway_sku_express_route` to `starter_location_10_virtual_network_gateway_sku_express_route`: These are the default SKUs for the Express Route virtual network gateways based on the Azure locations sourced from the `starter_locations` variable. This can be used to set the SKU of the virtual network gateways.
`starter_location_01_virtual_network_gateway_sku_vpn` to `starter_location_10_virtual_network_gateway_sku_vpn`: These are the default SKUs for the VPN virtual network gateways based on the Azure locations sourced from the `starter_locations` variable. This can be used to set the SKU of the virtual network gateways.
`root_parent_management_group_id`: This is the id of the management group that the ALZ hierarchy will be nested under.
`subscription_id_identity`: The subscription ID of the subscription to deploy the identity resources to, sourced from the variable `subscription_id_identity`.
`subscription_id_connectivity`: The subscription ID of the subscription to deploy the connectivity resources to, sourced from the variable `subscription_id_connectivity`.
`subscription_id_management`: The subscription ID of the subscription to deploy the management resources to, sourced from the variable `subscription_id_management`.
*/
/*
--- Custom Replacements ---
You can define custom replacements to use throughout the configuration.
*/
custom_replacements = {
/*
--- Custom Name Replacements ---
You can define custom names and other strings to use throughout the configuration.
You can only use the built in replacements in this section.
NOTE: You cannot refer to another custom name in this variable.
*/
names = {
# Defender email security contact
defender_email_security_contact = "replace_me@replace_me.com"
# Resource group names
management_resource_group_name = "rg-management-$${starter_location_01}"
connectivity_hub_primary_resource_group_name = "rg-hub-$${starter_location_01}"
dns_resource_group_name = "rg-hub-dns-$${starter_location_01}"
ddos_resource_group_name = "rg-hub-ddos-$${starter_location_01}"
asc_export_resource_group_name = "rg-asc-export-$${starter_location_01}"
# Resource names
log_analytics_workspace_name = "law-management-$${starter_location_01}"
ddos_protection_plan_name = "ddos-$${starter_location_01}"
automation_account_name = "aa-management-$${starter_location_01}"
ama_user_assigned_managed_identity_name = "uami-management-ama-$${starter_location_01}"
dcr_change_tracking_name = "dcr-change-tracking"
dcr_defender_sql_name = "dcr-defender-sql"
dcr_vm_insights_name = "dcr-vm-insights"
# Resource names primary connectivity
primary_virtual_network_name = "vnet-hub-$${starter_location_01}"
primary_subnet_nva_name = "subnet-nva-$${starter_location_01}"
primary_route_table_firewall_name = "rt-hub-fw-$${starter_location_01}"
primary_route_table_user_subnets_name = "rt-hub-std-$${starter_location_01}"
primary_virtual_network_gateway_express_route_name = "vgw-hub-er-$${starter_location_01}"
primary_virtual_network_gateway_express_route_public_ip_name = "pip-vgw-hub-er-$${starter_location_01}"
primary_virtual_network_gateway_vpn_name = "vgw-hub-vpn-$${starter_location_01}"
primary_virtual_network_gateway_vpn_public_ip_name_1 = "pip-vgw-hub-vpn-$${starter_location_01}-001"
primary_virtual_network_gateway_vpn_public_ip_name_2 = "pip-vgw-hub-vpn-$${starter_location_01}-002"
primary_private_dns_resolver_name = "pdr-hub-dns-$${starter_location_01}"
primary_bastion_host_name = "bas-hub-$${starter_location_01}"
primary_bastion_host_public_ip_name = "pip-bastion-hub-$${starter_location_01}"
# Private DNS Zones primary
primary_auto_registration_zone_name = "$${starter_location_01}.azure.local"
# IP Ranges Primary
# Regional Address Space: 10.0.0.0/16
primary_hub_address_space = "10.0.0.0/16"
primary_hub_virtual_network_address_space = "10.0.0.0/22"
primary_nva_subnet_address_prefix = "10.0.0.0/26"
primary_nva_ip_address = "10.0.0.4"
primary_bastion_subnet_address_prefix = "10.0.0.64/26"
primary_gateway_subnet_address_prefix = "10.0.0.128/27"
primary_private_dns_resolver_subnet_address_prefix = "10.0.0.160/28"
}
/*
--- Custom Resource Group Identifier Replacements ---
You can define custom resource group identifiers to use throughout the configuration.
You can only use the templated variables and custom names in this section.
NOTE: You cannot refer to another custom resource group identifier in this variable.
*/
resource_group_identifiers = {
management_resource_group_id = "/subscriptions/$${subscription_id_management}/resourcegroups/$${management_resource_group_name}"
ddos_protection_plan_resource_group_id = "/subscriptions/$${subscription_id_connectivity}/resourcegroups/$${ddos_resource_group_name}"
}
/*
--- Custom Resource Identifier Replacements ---
You can define custom resource identifiers to use throughout the configuration.
You can only use the templated variables, custom names and customer resource group identifiers in this variable.
NOTE: You cannot refer to another custom resource identifier in this variable.
*/
resource_identifiers = {
ama_change_tracking_data_collection_rule_id = "$${management_resource_group_id}/providers/Microsoft.Insights/dataCollectionRules/$${dcr_change_tracking_name}"
ama_mdfc_sql_data_collection_rule_id = "$${management_resource_group_id}/providers/Microsoft.Insights/dataCollectionRules/$${dcr_defender_sql_name}"
ama_vm_insights_data_collection_rule_id = "$${management_resource_group_id}/providers/Microsoft.Insights/dataCollectionRules/$${dcr_vm_insights_name}"
ama_user_assigned_managed_identity_id = "$${management_resource_group_id}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$${ama_user_assigned_managed_identity_name}"
log_analytics_workspace_id = "$${management_resource_group_id}/providers/Microsoft.OperationalInsights/workspaces/$${log_analytics_workspace_name}"
ddos_protection_plan_id = "$${ddos_protection_plan_resource_group_id}/providers/Microsoft.Network/ddosProtectionPlans/$${ddos_protection_plan_name}"
}
}
enable_telemetry = true
/*
--- Tags ---
This variable can be used to apply tags to all resources that support it. Some resources allow overriding these tags.
*/
tags = {
deployed_by = "terraform"
source = "Azure Landing Zones Accelerator"
}
/*
--- Management Resources ---
You can use this section to customize the management resources that will be deployed.
*/
management_resource_settings = {
automation_account_name = "$${automation_account_name}"
location = "$${starter_location_01}"
log_analytics_workspace_name = "$${log_analytics_workspace_name}"
resource_group_name = "$${management_resource_group_name}"
user_assigned_managed_identities = {
ama = {
name = "$${ama_user_assigned_managed_identity_name}"
}
}
data_collection_rules = {
change_tracking = {
name = "$${dcr_change_tracking_name}"
}
defender_sql = {
name = "$${dcr_defender_sql_name}"
}
vm_insights = {
name = "$${dcr_vm_insights_name}"
}
}
}
/*
--- Management Groups and Policy ---
You can use this section to customize the management groups and policies that will be deployed.
You can further configure management groups and policy by supplying a `lib` folder. This is detailed in the Accelerator documentation.
*/
management_group_settings = {
location = "$${starter_location_01}"
parent_resource_id = "$${root_parent_management_group_id}"
policy_default_values = {
ama_change_tracking_data_collection_rule_id = "$${ama_change_tracking_data_collection_rule_id}"
ama_mdfc_sql_data_collection_rule_id = "$${ama_mdfc_sql_data_collection_rule_id}"
ama_vm_insights_data_collection_rule_id = "$${ama_vm_insights_data_collection_rule_id}"
ama_user_assigned_managed_identity_id = "$${ama_user_assigned_managed_identity_id}"
ama_user_assigned_managed_identity_name = "$${ama_user_assigned_managed_identity_name}"
log_analytics_workspace_id = "$${log_analytics_workspace_id}"
ddos_protection_plan_id = "$${ddos_protection_plan_id}"
private_dns_zone_subscription_id = "$${subscription_id_connectivity}"
private_dns_zone_region = "$${starter_location_01}"
private_dns_zone_resource_group_name = "$${dns_resource_group_name}"
}
subscription_placement = {
identity = {
subscription_id = "$${subscription_id_identity}"
management_group_name = "identity"
}
connectivity = {
subscription_id = "$${subscription_id_connectivity}"
management_group_name = "connectivity"
}
management = {
subscription_id = "$${subscription_id_management}"
management_group_name = "management"
}
}
policy_assignments_to_modify = {
alz = {
policy_assignments = {
Deploy-MDFC-Config-H224 = {
parameters = {
ascExportResourceGroupName = "$${asc_export_resource_group_name}"
ascExportResourceGroupLocation = "$${starter_location_01}"
emailSecurityContact = "$${defender_email_security_contact}"
enableAscForServers = "DeployIfNotExists"
enableAscForServersVulnerabilityAssessments = "DeployIfNotExists"
enableAscForSql = "DeployIfNotExists"
enableAscForAppServices = "DeployIfNotExists"
enableAscForStorage = "DeployIfNotExists"
enableAscForContainers = "DeployIfNotExists"
enableAscForKeyVault = "DeployIfNotExists"
enableAscForSqlOnVm = "DeployIfNotExists"
enableAscForArm = "DeployIfNotExists"
enableAscForOssDb = "DeployIfNotExists"
enableAscForCosmosDbs = "DeployIfNotExists"
enableAscForCspm = "DeployIfNotExists"
}
}
}
}
/*
# Example of how to update a policy assignment enforcement mode for DDOS Protection Plan
connectivity = {
policy_assignments = {
Enable-DDoS-VNET = {
enforcement_mode = "DoNotEnforce"
}
}
}
*/
/*
# Example of how to update a policy assignment enforcement mode for Private Link DNS Zones
corp = {
policy_assignments = {
Deploy-Private-DNS-Zones = {
enforcement_mode = "DoNotEnforce"
}
}
}
*/
}
}
/*
--- Connectivity - Hub and Spoke Virtual Network ---
You can use this section to customize the hub virtual networking that will be deployed.
*/
connectivity_type = "hub_and_spoke_vnet"
connectivity_resource_groups = {
ddos = {
name = "$${ddos_resource_group_name}"
location = "$${starter_location_01}"
}
vnet_primary = {
name = "$${connectivity_hub_primary_resource_group_name}"
location = "$${starter_location_01}"
}
dns = {
name = "$${dns_resource_group_name}"
location = "$${starter_location_01}"
}
}
hub_and_spoke_vnet_settings = {
ddos_protection_plan = {
name = "$${ddos_protection_plan_name}"
resource_group_name = "$${ddos_resource_group_name}"
location = "$${starter_location_01}"
}
}
hub_and_spoke_vnet_virtual_networks = {
primary = {
hub_virtual_network = {
name = "$${primary_virtual_network_name}"
resource_group_name = "$${connectivity_hub_primary_resource_group_name}"
location = "$${starter_location_01}"
address_space = ["$${primary_hub_virtual_network_address_space}"]
routing_address_space = ["$${primary_hub_address_space}"]
route_table_name_firewall = "$${primary_route_table_firewall_name}"
route_table_name_user_subnets = "$${primary_route_table_user_subnets_name}"
ddos_protection_plan_id = "$${ddos_protection_plan_id}"
hub_router_ip_address = "$${primary_nva_ip_address}"
subnets = {
nva = {
name = "$${primary_subnet_nva_name}"
address_prefixes = ["$${primary_nva_subnet_address_prefix}"]
}
}
}
virtual_network_gateways = {
subnet_address_prefix = "$${primary_gateway_subnet_address_prefix}"
express_route = {
location = "$${starter_location_01}"
name = "$${primary_virtual_network_gateway_express_route_name}"
sku = "$${starter_location_01_virtual_network_gateway_sku_express_route}"
ip_configurations = {
default = {
public_ip = {
name = "$${primary_virtual_network_gateway_express_route_public_ip_name}"
zones = "$${starter_location_01_availability_zones}"
}
}
}
}
vpn = {
location = "$${starter_location_01}"
name = "$${primary_virtual_network_gateway_vpn_name}"
sku = "$${starter_location_01_virtual_network_gateway_sku_vpn}"
ip_configurations = {
active_active_1 = {
public_ip = {
name = "$${primary_virtual_network_gateway_vpn_public_ip_name_1}"
zones = "$${starter_location_01_availability_zones}"
}
}
active_active_2 = {
public_ip = {
name = "$${primary_virtual_network_gateway_vpn_public_ip_name_2}"
zones = "$${starter_location_01_availability_zones}"
}
}
}
}
}
private_dns_zones = {
resource_group_name = "$${dns_resource_group_name}"
is_primary = true
auto_registration_zone_enabled = true
auto_registration_zone_name = "$${primary_auto_registration_zone_name}.azure.local"
subnet_address_prefix = "$${primary_private_dns_resolver_subnet_address_prefix}"
private_dns_resolver = {
name = "$${primary_private_dns_resolver_name}"
}
}
bastion = {
subnet_address_prefix = "$${primary_bastion_subnet_address_prefix}"
bastion_host = {
name = "$${primary_bastion_host_name}"
}
bastion_public_ip = {
name = "$${primary_bastion_host_public_ip_name}"
zones = "$${starter_location_01_availability_zones}"
}
}
}
}