Repository navigation
Expand file tree
/
Copy pathvariables.tf
More file actions
216 lines (183 loc) · 8.61 KB
/
Copy pathvariables.tf
File metadata and controls
216 lines (183 loc) · 8.61 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
variable "spin_version" {
description = "The release the installation runs: a release, v<YYYYMMDD>.<N>, or a channel - edge, every release once its images are published and checked on EC2, or stable, one a person promoted. Every machine boots the Spin OS image of the release, as the image catalog has it and its release signed it (the spin provider). A channel is read at every plan, so the release it names moves an installation when its next plan is applied."
type = string
}
variable "domain" {
description = "The base domain: the dashboard is app.<domain>, workspaces are *.ws.<domain>."
type = string
}
variable "name" {
description = "The installation's name, one per region of an account (two regions may share it): every resource's prefix, the SSM path /spin/<name>/, and with the region every IAM name. 2 to 26 characters; modules/controlplane's default is spin."
type = string
default = null
}
variable "acme_email" {
description = "The address Let's Encrypt writes to; none is admin@<domain>."
type = string
default = null
}
variable "admin_email" {
description = "Who the first administrator signs in as; none is admin@<domain>."
type = string
default = null
}
variable "runner_policy" {
description = "The host policy a runner starts with when it joins: shutdown_grace and preemption_source; modules/controlplane's default is a spot runner on AWS with 100s."
type = object({
shutdown_grace = optional(string)
preemption_source = optional(string)
})
default = null
}
variable "proxy_allowed_cidrs" {
description = "Where users reach the proxy on 443 from; modules/controlplane's default is anywhere."
type = list(string)
default = null
}
variable "instance_type" {
description = "The control plane's machine; modules/controlplane's default is t8i.medium."
type = string
default = null
}
variable "proxy_instance_type" {
description = "The proxy's machine; modules/controlplane's default is t8i.micro."
type = string
default = null
}
variable "collector" {
description = "The collector, as modules/controlplane's collector object: how often metrics are pushed to it; modules/controlplane's default is 60s. Where it sends is set in the dashboard."
type = object({
metric_interval = optional(string)
})
default = null
}
variable "controlplane_volume_gb" {
description = "The control plane's disk, which /var - the database and the stores - takes all of past the OS; modules/controlplane's default is 40."
type = number
default = null
}
variable "image_ids" {
description = "Spin OS AMIs of your own, one per role - control-plane, runner and proxy - instead of those the catalog names for spin_version in this region."
type = map(string)
default = null
}
variable "image_measurements" {
description = "The builds of each role's image - control-plane, runner and proxy - oldest first, each the PCRs an instance of it measures (its manifest's measurements), instead of the catalog's: the control plane's key is answered to the control plane's builds, a host joins only as the runner's, and the proxy is given its token only as the proxy's. The control plane's and the runner's also carry statement and bundle, base64, as spin-os images sign writes them. The last of a role's is the image image_ids names. Required with image_ids."
type = map(list(object({
pcr4 = string
pcr7 = string
pcr12 = string
statement = optional(string)
bundle = optional(string)
revoked = optional(string)
})))
default = null
}
variable "installation_config" {
description = "The installation's config file (spin's configs/spin-example.yaml), as YAML: the control plane seeds its database from it at start, and shows a later change to it in the dashboard to apply or dismiss."
type = string
default = null
}
variable "runner_idle_minutes" {
description = "How long the fleet is idle before its runners' group is emptied; modules/controlplane's default is 60."
type = number
default = null
}
variable "time_zone" {
description = "The IANA zone each host class's quiet hours are read in; modules/controlplane's default is UTC."
type = string
default = null
}
variable "runner_instance_types" {
description = "The types the runners' group may start, as names or patterns (c8id.*), one CPU generation; see modules/runners."
type = list(string)
default = null
}
variable "runner_vcpus" {
description = "How many vCPUs a runner may have, { min, max }; modules/runners' default is 32 to 48."
type = object({ min = number, max = number })
default = null
}
variable "runner_spot" {
description = "Every runner a spot instance; modules/runners' default is true."
type = bool
default = null
}
variable "runner_data_volume_gb" {
description = "An EBS volume for each runner's data, for instance types with no local NVMe (none of sa-east-1's with nested virtualization have one). modules/runners' default, 0, uses the instance store."
type = number
default = null
}
variable "runner_root_volume_gb" {
description = "Each runner's root disk: the OS and the machine's files. modules/runners' default is 30."
type = number
default = null
}
variable "request_quota" {
description = "Ask AWS for the vCPU quota max_runners runners need when the account's is lower; modules/runners' default is true."
type = bool
default = null
}
variable "max_runners" {
description = "The most runners the group may have; the control plane decides how many it has. modules/runners' default is 1."
type = number
default = null
}
variable "runner_rollout" {
description = "How a new release reaches the runners: idle, when the fleet next empties, moving no workspace (modules/runners' default); or rolling, replacing them at once, their workspaces suspended and resumed on the new hosts."
type = string
default = null
}
variable "decommission" {
description = "Set to true and apply before `tofu destroy`: the buckets lose their VPC-only policies and a destroy empties them, data included (README.md, \"Removing an installation\"). modules/controlplane's default is false."
type = bool
default = null
}
variable "encryption_key_versions" {
description = "The versions of the control plane's encryption key: append the next to rotate it, remove the old one only once `controlplane crypto rotate` reports nothing left under it (spin-stack/runbooks key-rotation). modules/controlplane's default is [1]."
type = list(number)
default = null
}
variable "identity_keys" {
description = "The identity keys past the installation's first, by the kid `controlplane identity rotate` prints, newest last; a retired one carries the time `controlplane identity retire` prints (spin-stack/runbooks identity-audit-failing). modules/controlplane's default is []."
type = list(object({
kid = string
retired = optional(string)
}))
default = null
}
variable "monthly_budget_usd" {
description = "What the installation may cost in a month, in US dollars: an AWS Budget the control plane reads and whose alerts go to budget_emails. Null is no budget."
type = number
default = null
}
variable "security_emails" {
description = "Who is emailed when the control plane's role starts a machine itself, and when the control plane is down and again when it is back. Each address confirms two subscriptions once; an unconfirmed one is told nothing."
type = list(string)
default = null
}
variable "budget_emails" {
description = "Who is emailed when the month's cost passes 80 % or 100 % of monthly_budget_usd, or is forecast to pass it."
type = list(string)
default = null
}
variable "flow_logs" {
description = "Keep the VPC's flow log in CloudWatch: every connection a security group accepted or refused, but no DNS to the VPC's resolver, which it does not see. modules/controlplane's default is true."
type = bool
default = null
}
variable "dns_query_logs" {
description = "Keep the VPC resolver's query log in CloudWatch: every name looked up, a workspace's included, and the only record of them: the flow log does not see DNS. modules/controlplane's default is false."
type = bool
default = null
}
variable "log_retention_days" {
description = "How long the flow and query logs are kept. modules/controlplane's default is 30."
type = number
default = null
}
variable "tags" {
description = "Tags on everything both modules create."
type = map(string)
default = null
}