-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
44 lines (39 loc) · 1.93 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
resource "azurerm_virtual_desktop_host_pool" "wvd_pool" {
name = "${var.prefix}${var.wvd-hostpool-name}"
resource_group_name = var.resource_group_name
location = var.location
type = "Pooled"
load_balancer_type = "BreadthFirst" # Options: BreadthFirst / DepthFirst
friendly_name = var.wvd-hostpool-friendly-name
description = var.wvd-hostpool-description
validate_environment = false
maximum_sessions_allowed = var.wvd-hostpool-max-sessions
custom_rdp_properties = var.hostpool-custom_rdp_properties
tags = var.tags
}
resource "azurerm_virtual_desktop_host_pool_registration_info" "wvd_pool" {
hostpool_id = azurerm_virtual_desktop_host_pool.wvd_pool.id
expiration_date = timeadd(timestamp(), "628h")
}
resource "azurerm_virtual_desktop_application_group" "default_wvd_app_group" {
name = "${var.prefix}${var.wvd-defaultappgroup-name}"
resource_group_name = var.resource_group_name
location = var.location
type = "Desktop"
host_pool_id = azurerm_virtual_desktop_host_pool.wvd_pool.id
friendly_name = var.wvd-defaultappgroup-friendly-name
description = var.wvd-defaultappgroup-description
tags = var.tags
}
resource "azurerm_virtual_desktop_workspace" "wvd_workspace" {
name = "${var.prefix}${var.wvd-workspace-name}"
resource_group_name = var.resource_group_name
location = var.location
friendly_name = var.wvd-workspace-friendly-name
description = var.wvd-workspace-description
tags = var.tags
}
resource "azurerm_virtual_desktop_workspace_application_group_association" "wvd_workspace_appgroup" {
workspace_id = azurerm_virtual_desktop_workspace.wvd_workspace.id
application_group_id = azurerm_virtual_desktop_application_group.default_wvd_app_group.id
}