-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure_virtual_desktop.tf
74 lines (64 loc) · 2.55 KB
/
azure_virtual_desktop.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
module "avd_host_pools" {
source = "./modules/compute/avd_host_pool"
for_each = {
for key, value in try(local.settings.azure_virtual_desktops.host_pools, {}) : key => value
if try(value.enabled, false) == true
}
global_settings = local.settings
location = try(each.value.location, null)
settings = each.value
resource_group_name = local.resource_groups[each.value.resource_group_key].name
tags = try(each.value.tags, null)
}
module "avd_scaling_plans" {
depends_on = [
module.roles
]
source = "./modules/compute/avd_scaling_plan"
for_each = {
for key, value in try(local.settings.azure_virtual_desktops.scaling_plans, {}) : key => value
if try(value.enabled, false) == true
}
global_settings = local.settings
location = try(each.value.location, null)
settings = each.value
resource_group_name = local.resource_groups[each.value.resource_group_key].name
avd_host_pools = module.avd_host_pools
tags = try(each.value.tags, null)
}
module "avd_workspaces" {
source = "./modules/compute/avd_workspace"
for_each = {
for key, value in try(local.settings.azure_virtual_desktops.workspaces, {}) : key => value
if try(value.enabled, false) == true
}
global_settings = local.settings
location = try(each.value.location, null)
settings = each.value
resource_group_name = local.resource_groups[each.value.resource_group_key].name
tags = try(each.value.tags, null)
}
module "avd_app_groups" {
source = "./modules/compute/avd_application_group"
for_each = {
for key, value in try(local.settings.azure_virtual_desktops.application_groups, {}) : key => value
if try(value.enabled, false) == true
}
global_settings = local.settings
location = try(each.value.location, null)
settings = each.value
resource_group_name = local.resource_groups[each.value.resource_group_key].name
tags = try(each.value.tags, null)
host_pool_id = module.avd_host_pools[each.value.host_pool_key].id
workspace_id = module.avd_workspaces[each.value.workspace_key].id
}
module "avd_applications" {
source = "./modules/compute/avd_applications"
for_each = {
for key, value in try(local.settings.azure_virtual_desktops.applications, {}) : key => value
if try(value.enabled, false) == true
}
global_settings = local.settings
settings = each.value
application_group_id = module.avd_app_groups[each.value.app_group_key].id
}