-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tf
115 lines (104 loc) · 4.31 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
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
data "azurerm_client_config" "current" {}
module "enterprise_scale" {
source = "Azure/caf-enterprise-scale/azurerm"
version = "0.3.3"
root_parent_id = data.azurerm_client_config.current.tenant_id
root_id = var.root_id
root_name = var.root_name
library_path = "./lib"
default_location = var.location
deploy_core_landing_zones = true
deploy_management_resources = true
deploy_demo_landing_zones = false
subscription_id_management = var.subscription_id_management
subscription_id_identity = var.subscription_id_identity
subscription_id_connectivity = var.subscription_id_connectivity
subscription_id_overrides = {
landing-zones = [
"${var.subscription_id_workload}"
]
}
configure_management_resources = local.configure_management_resources
providers = {
azurerm = azurerm.management
}
}
module "hub_network" {
source = "./core-hubnetwork"
count = var.deploy_hub > 0 ? 1 : 0
depends_on = [ module.enterprise_scale ]
root_id = var.root_id
root_name = var.root_name
subscription_id_connectivity = var.subscription_id_connectivity
location = var.location
hub_tags = var.hub_tags
subnetprefix = var.subnetprefix
onprem_gateway_ip = var.onprem_gateway_ip
onprem_address_space = var.onprem_address_space
dns_servers = var.dns_servers
vpn_key = var.vpn_key
providers = {
azurerm = azurerm.connectivity
azurerm.connectivity = azurerm.connectivity
}
}
module "windows_domain" {
source = "./core-domain"
count = var.deploy_domain > 0 ? 1 : 0
depends_on = [ module.enterprise_scale, module.hub_network ]
root_id = var.root_id
root_name = var.root_name
subscription_id_identity = var.subscription_id_identity
location = var.location
domain_tags = var.domain_tags
subnetprefix = var.subnetprefix
vm_size = var.vm_size
vm_disk_sku = var.vm_disk_sku
admin_username = var.admin_username
admin_password = var.admin_password
active_directory_domain = var.active_directory_domain
active_directory_netbios_name = var.active_directory_netbios_name
providers = {
azurerm = azurerm.identity
azurerm.connectivity = azurerm.connectivity
azurerm.identity = azurerm.identity
}
}
module "workload_vm" {
source = "./workload-vm"
count = var.deploy_workload > 0 ? 1 : 0
depends_on = [ module.enterprise_scale, module.hub_network ]
root_id = var.root_id
root_name = var.root_name
subscription_id_connectivity = var.subscription_id_connectivity
subscription_id_workload = var.subscription_id_workload
location = var.location
workload_tags = var.workload_tags
subnetprefix = var.subnetprefix
vm_size = var.vm_size
vm_disk_sku = var.vm_disk_sku
admin_username = var.admin_username
admin_password = var.admin_password
active_directory_domain = var.active_directory_domain
scaleset_instance_count = var.scaleset_instance_count
providers = {
azurerm = azurerm.workload
azurerm.connectivity = azurerm.connectivity
azurerm.identity = azurerm.identity
azurerm.workload = azurerm.workload
}
}
module "workload_arc" {
source = "./workload-arc"
count = var.deploy_arc > 0 ? 1 : 0
depends_on = [ module.enterprise_scale, module.hub_network ]
root_id = var.root_id
root_name = var.root_name
subscription_id_workload = var.subscription_id_workload
location = var.location
workload_tags = var.workload_tags
providers = {
azurerm = azurerm.workload
azurerm.workload = azurerm.workload
}
}