-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparameters.tf
More file actions
98 lines (87 loc) · 2.45 KB
/
parameters.tf
File metadata and controls
98 lines (87 loc) · 2.45 KB
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
data "coder_parameter" "flake_uri" {
name = "flake_uri"
display_name = "Flake URI"
description = "URI of the NixOS configuration flake to be installed on the system"
type = "string"
mutable = true
}
data "coder_parameter" "agent_user" {
name = "agent_user"
display_name = "Username"
description = "User to login as. This user should be created by your NixOS config"
type = "string"
default = var.default_agent_user
mutable = true
}
data "coder_parameter" "root_disk_size" {
name = "root_disk_size"
display_name = "Root disk size"
description = "Size of the root disk of the instance"
type = "number"
mutable = true
validation {
min = 1
monotonic = "increasing"
}
default = 15
}
data "coder_parameter" "home_disk_size" {
name = "home_disk_size"
display_name = "Home disk size"
description = "Size of the home disk of the instance"
type = "number"
mutable = true
validation {
min = 1
monotonic = "increasing"
}
default = 10
}
data "coder_parameter" "instance_type" {
name = "instance_type"
display_name = "Instance type"
description = "Instance type to deploy"
default = "t3.micro"
type = "string"
mutable = true
// NOTE: Too many types.
// dynamic "option" {
// for_each = toset(local._local-types)
// content {
// name = option.key
// value = option.key
// }
// }
}
data "coder_parameter" "region" {
name = "region"
display_name = "Region"
default = "us-west-2"
type = "string"
description = "Region to deploy instance to"
mutable = false
dynamic "option" {
for_each = toset(local.regions)
content {
name = option.key
value = option.key
}
}
}
data "coder_parameter" "iam_role_name" {
name = "iam_role_name"
display_name = "IAM Role Name"
description = "If given, the deployed instance will be able to assume this IAM role. The IAM role must have a sufficiently permissive assume_role_policy to allow EC2 instances to assume the role."
default = ""
type = "string"
mutable = true
}
data "coder_parameter" "spot_price" {
count = var.is_spot ? 1 : 0
name = "spot_price"
display_name = "Spot price"
description = "Maximum spot price. Leave empty for unlimited"
default = ""
type = "string"
mutable = true
}