-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathresource.tf
115 lines (103 loc) · 2.17 KB
/
resource.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 "coder_parameter" "example" {
name = "Region"
description = "Specify a region to place your workspace."
mutable = false
type = "string"
default = "asia-central1-a"
option {
value = "us-central1-a"
name = "US Central"
icon = "/icon/usa.svg"
}
option {
value = "asia-central1-a"
name = "Asia"
icon = "/icon/asia.svg"
}
}
data "coder_parameter" "ami" {
name = "Machine Image"
description = <<-EOT
# Provide the machine image
See the [registry](https://container.registry.blah/namespace) for options.
EOT
option {
value = "ami-xxxxxxxx"
name = "Ubuntu"
icon = "/icon/ubuntu.svg"
}
}
data "coder_parameter" "is_public_instance" {
name = "Is public instance?"
type = "bool"
icon = "/icon/docker.svg"
default = false
}
data "coder_parameter" "cores" {
name = "CPU Cores"
type = "number"
icon = "/icon/cpu.svg"
default = 3
order = 10
}
data "coder_parameter" "disk_size" {
name = "Disk Size"
type = "number"
default = "5"
order = 8
validation {
# This can apply to number.
min = 0
max = 10
monotonic = "increasing"
}
}
data "coder_parameter" "cat_lives" {
name = "Cat Lives"
type = "number"
default = "9"
validation {
# This can apply to number.
min = 0
max = 10
monotonic = "decreasing"
}
}
data "coder_parameter" "fairy_tale" {
name = "Fairy Tale"
type = "string"
mutable = true
default = "Hansel and Gretel"
ephemeral = true
}
data "coder_parameter" "users" {
name = "system_users"
display_name = "System users"
type = "list(string)"
default = jsonencode(["root", "user1", "user2"])
}
data "coder_parameter" "home_volume_size" {
name = "Home Volume Size"
description = <<-EOF
How large should your home volume be?
EOF
type = "number"
default = 30
mutable = true
order = 3
option {
name = "30GB"
value = 30
}
option {
name = "60GB"
value = 60
}
option {
name = "100GB"
value = 100
}
validation {
monotonic = "increasing"
}
}