generated from UCL-ARC/terraform-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
70 lines (61 loc) · 1.8 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
resource "aws_appstream_fleet" "this" {
compute_capacity {
desired_instances = var.desired_instance_num
}
name = var.fleet_name
description = var.fleet_description
display_name = var.fleet_display_name
enable_default_internet_access = false
fleet_type = "ON_DEMAND"
image_name = var.image_name
instance_type = var.instance_type
idle_disconnect_timeout_in_seconds = 1800 # 30 mins
disconnect_timeout_in_seconds = 60
max_user_duration_in_seconds = 7200 # 2 hours
stream_view = "DESKTOP"
vpc_config {
subnet_ids = var.fleet_subnet_ids
security_group_ids = [aws_security_group.appstream.id]
}
}
resource "aws_appstream_stack" "this" {
name = var.stack_name
description = var.stack_description
display_name = var.stack_display_name
storage_connectors {
connector_type = "HOMEFOLDERS"
}
user_settings {
action = "CLIPBOARD_COPY_FROM_LOCAL_DEVICE"
permission = "ENABLED"
}
user_settings {
action = "CLIPBOARD_COPY_TO_LOCAL_DEVICE"
permission = "DISABLED"
}
user_settings {
action = "FILE_UPLOAD"
permission = "ENABLED"
}
user_settings {
action = "FILE_DOWNLOAD"
permission = "DISABLED"
}
user_settings {
action = "DOMAIN_PASSWORD_SIGNIN"
permission = "ENABLED"
}
user_settings {
action = "DOMAIN_SMART_CARD_SIGNIN"
permission = "DISABLED"
}
user_settings {
action = "PRINTING_TO_LOCAL_DEVICE"
permission = "DISABLED"
}
}
# Associates fleet to stack
resource "aws_appstream_fleet_stack_association" "this" {
fleet_name = aws_appstream_fleet.this.name
stack_name = aws_appstream_stack.this.name
}