forked from rancher/terraform-k3s-aws-cluster
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathvariables.tf
343 lines (286 loc) · 7.88 KB
/
variables.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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
variable "rancher_password" {
type = string
description = "Password to set for admin user during bootstrap of Rancher Server"
}
variable "rancher_version" {
type = string
default = "2.6.6"
description = "Version of Rancher to install"
}
variable "agent_image_id" {
type = string
default = null
description = "AMI to use for k3s agent instances"
}
variable "server_image_id" {
type = string
default = null
description = "AMI to use for k3s server instances"
}
variable "ssh_keys" {
type = list(string)
default = []
description = "SSH keys to inject into Rancher instances"
}
variable "rancher_chart" {
type = string
default = "rancher-stable/rancher"
description = "Helm chart to use for Rancher install"
}
variable "name" {
type = string
default = "rancher-demo"
description = "Name for deployment"
}
variable "letsencrypt_environment" {
type = string
default = "production"
description = "LetsEncrypt environment to use ('production' or 'staging')"
}
variable "letsencrypt_email" {
type = string
default = "[email protected]"
description = "LetsEncrypt email address to use"
}
variable "domain" {
type = string
default = "eng.rancher.space"
}
variable "r53_domain" {
type = string
default = ""
description = "DNS domain for Route53 zone (defaults to domain if unset)"
}
variable "server_instance_type" {
type = string
default = "m6g.large"
}
variable "agent_instance_type" {
type = string
default = "m6g.large"
}
variable "server_node_count" {
type = number
default = 1
description = "Number of server nodes to launch"
}
variable "agent_node_count" {
type = number
default = 3
description = "Number of agent nodes to launch"
}
variable "db_node_count" {
type = number
default = 1
description = "Number of RDS database instances to launch"
}
variable "server_instance_ssh_user" {
type = string
default = "ubuntu"
description = "Username for sshing into instances"
}
variable "agent_instance_ssh_user" {
type = string
default = "ubuntu"
description = "Username for sshing into instances"
}
variable "certmanager_version" {
type = string
default = "1.8.0"
description = "Version of cert-manager to install"
}
variable "vpc_id" {
type = string
default = null
description = "The vpc id that Rancher should use"
}
variable "aws_region" {
type = string
default = null
}
variable "aws_profile" {
type = string
default = null
description = "Name of the AWS Profile to use for authentication"
}
variable "public_subnets" {
default = []
type = list(any)
description = "List of public subnet ids."
}
variable "private_subnets" {
default = []
type = list(any)
description = "List of private subnet ids."
}
variable "install_k3s_version" {
default = "1.22.9+k3s1"
type = string
description = "Version of K3S to install"
}
variable "k3s_cluster_secret" {
default = null
type = string
description = "Override to set k3s cluster registration secret"
}
variable "extra_server_security_groups" {
default = []
type = list(any)
description = "Additional security groups to attach to k3s server instances"
}
variable "extra_agent_security_groups" {
default = []
type = list(any)
description = "Additional security groups to attach to k3s agent instances"
}
variable "aws_azs" {
default = null
type = list(any)
description = "List of AWS Availability Zones in the VPC"
}
variable "db_instance_type" {
default = "db.r6g.large"
}
variable "db_name" {
default = null
type = string
description = "Name of database to create in RDS"
}
variable "db_user" {
type = string
description = "Username for RDS database"
}
variable "db_pass" {
type = string
description = "Password for RDS user"
}
variable "db_engine_version" {
default = "13.4"
type = string
description = "Engine Version for RDS Database"
}
variable "private_subnets_cidr_blocks" {
default = []
type = list(any)
description = "List of cidr_blocks of private subnets"
}
variable "public_subnets_cidr_blocks" {
default = []
type = list(any)
description = "List of cidr_blocks of public subnets"
}
variable "skip_final_snapshot" {
default = false
type = bool
description = "Boolean that defines whether or not the final snapshot should be created on RDS cluster deletion"
}
variable "install_rancher" {
default = false
type = bool
description = "Boolean that defines whether or not to install Rancher"
}
variable "install_certmanager" {
default = false
type = bool
description = "Boolean that defines whether or not to install Cert-Manager"
}
variable "create_external_nlb" {
default = true
type = bool
description = "Boolean that defines whether or not to create an external load balancer"
}
variable "k3s_datastore_cafile" {
default = "/srv/rds-combined-ca-bundle.pem"
type = string
description = "Location to download RDS CA Bundle"
}
variable "registration_command" {
default = ""
type = string
description = "Registration command to import cluster into Rancher. Should not be used when installing Rancher in this same cluster"
}
variable "k3s_datastore_endpoint" {
default = "sqlite"
type = string
description = "Storage Backend for K3S cluster to use. Valid options are 'sqlite' or 'postgres'"
}
variable "k3s_disable_agent" {
default = false
type = bool
description = "Whether to run the k3s agent on the same host as the k3s server"
}
variable "k3s_tls_san" {
default = null
type = string
description = "Sets k3s tls-san flag to this value instead of the default load balancer"
}
variable "rancher2_token_key" {
default = null
type = string
description = "Rancher2 API token for authentication"
}
variable "agent_k3s_exec" {
default = null
type = string
description = "exec args to pass to k3s agents"
}
variable "server_k3s_exec" {
default = "--disable traefik --disable servicelb --no-deploy local-storage"
type = string
description = "exec args to pass to k3s server"
}
variable "use_route53" {
default = true
type = bool
description = "Configures whether to use route_53 DNS or not"
}
variable "subdomain" {
default = null
type = string
description = "subdomain to host rancher on, instead of using `var.name`"
}
variable "rds_ca_cert_identifier" {
default = "rds-ca-2019"
type = string
description = "The identifier of the CA certificate for the DB instance."
}
variable "db_allow_major_version_upgrade" {
default = true
type = bool
description = "Enable to allow major engine version upgrades when changing engine versions."
}
variable "db_parameter_group_family" {
default = "aurora-postgresql13"
type = string
description = "engine family for parameter group"
}
variable "server_volume_type" {
default = "gp3"
description = "Volume Type for K3S Server nodes"
type = string
}
variable "agent_volume_type" {
default = "gp3"
description = "Volume Type for K3S Agent nodes"
type = string
}
variable "rancher_features" {
default = ""
description = "Comma-separated list of feature flags to enable in Rancher"
type = string
}
variable "rancher_token_update" {
default = false
description = "Regenerate admin token."
type = bool
}
variable "install_nginx" {
default = true
description = "Install ingress-nginx"
type = bool
}
variable "nginx_version" {
default = "4.1.3"
description = "Version of ingress-nginx helm chart to install"
type = string
}