-
Notifications
You must be signed in to change notification settings - Fork 6
/
variables.tf
430 lines (363 loc) · 11.9 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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
##########################################
# Common #
##########################################
variable "namespace" {
type = string
description = "String used for prefix resources."
}
variable "deletion_protection" {
description = "If the instance should have deletion protection enabled. The database / Bucket can't be deleted when this value is set to `true`."
type = bool
default = true
}
variable "labels" {
type = map(string)
description = "Labels to apply to resources"
default = {}
}
variable "use_internal_queue" {
type = bool
description = "Uses an internal redis queue instead of using google pubsub."
default = false
}
variable "wandb_version" {
description = "The version of Weights & Biases local to deploy."
type = string
default = "latest"
}
variable "wandb_image" {
description = "Docker repository of to pull the wandb image from."
type = string
default = "wandb/local"
}
variable "license" {
type = string
description = "Your wandb/local license"
}
variable "oidc_issuer" {
type = string
description = "A url to your Open ID Connect identity provider, i.e. https://cognito-idp.us-east-1.amazonaws.com/us-east-1_uiIFNdacd"
default = ""
}
variable "oidc_client_id" {
type = string
description = "The Client ID of application in your identity provider"
default = ""
}
variable "oidc_secret" {
type = string
description = "The Client secret of application in your identity provider"
default = ""
sensitive = true
}
variable "oidc_auth_method" {
type = string
description = "OIDC auth method"
default = "implicit"
validation {
condition = contains(["pkce", "implicit"], var.oidc_auth_method)
error_message = "Invalid OIDC auth method."
}
}
variable "local_restore" {
type = bool
description = "Restores W&B to a stable state if needed"
default = false
}
variable "resource_limits" {
description = "Specifies the resource limits for the wandb deployment"
type = map(string)
default = {
cpu = null
memory = null
}
}
variable "resource_requests" {
description = "Specifies the resource requests for the wandb deployment"
type = map(string)
default = {
cpu = "2000m"
memory = "2G"
}
}
##########################################
# Operator #
##########################################
variable "operator_chart_version" {
type = string
description = "Version of the operator chart to deploy"
default = "1.3.4"
}
variable "controller_image_tag" {
type = string
description = "Tag of the controller image to deploy"
default = "1.14.0"
}
##########################################
# Networking #
##########################################
variable "network" {
default = null
description = "Pre-existing network self link"
type = string
}
variable "subnetwork" {
default = null
description = "Pre-existing subnetwork self link"
type = string
}
variable "allowed_inbound_cidrs" {
default = ["*"]
description = "Which IPv4 addresses/ranges to allow access. This must be explicitly provided, and by default is set to [\"*\"]"
nullable = false
type = list(string)
}
##########################################
# DNS #
##########################################
variable "domain_name" {
type = string
default = null
description = "Domain for accessing the Weights & Biases UI."
}
variable "subdomain" {
type = string
default = null
description = "Subdomain for accessing the Weights & Biases UI. Default creates record at Route53 Route."
}
variable "ssl" {
type = bool
default = true
description = "Enable SSL certificate"
}
##########################################
# Database #
##########################################
variable "database_version" {
description = "Version for MySQL"
type = string
default = "MYSQL_8_0_31"
}
variable "database_machine_type" {
description = "Specifies the machine type to be allocated for the database. Defaults to null and value from deployment-size.tf is used"
type = string
default = null
}
variable "database_flags" {
description = "Flags to set for the database"
type = map(string)
default = {}
}
variable "database_sort_buffer_size" {
description = "Specifies the sort_buffer_size value to set for the database"
type = number
default = 67108864
}
variable "force_ssl" {
description = "Enforce SSL through the usage of the Cloud SQL Proxy (cloudsql://) in the DB connection string"
type = bool
default = false
}
##########################################
# Redis #
##########################################
variable "create_redis" {
type = bool
description = "Boolean indicating whether to provision an redis instance (true) or not (false)."
default = false
}
variable "redis_reserved_ip_range" {
type = string
description = "Reserved IP range for REDIS peering connection"
default = "10.30.0.0/16"
}
variable "redis_tier" {
type = string
description = "Specifies the tier for this Redis instance"
default = "STANDARD_HA"
}
variable "redis_memory_size_gb" {
type = number
description = "Specifies the memory size in GB for the Redis instance. Defaults to null and value from deployment-size.tf is used"
default = null
}
##########################################
# External Bucket #
##########################################
# Most users will not need these settings. They are meant for users who want a
# bucket in a different account.
variable "bucket_name" {
type = string
description = "Use an existing bucket."
default = ""
}
variable "bucket_location" {
type = string
description = "Location of the bucket (US, EU, ASIA)"
default = "US"
}
variable "skip_bucket_admin_role" {
type = bool
description = "Flag to indicate whether to skip the bucket policy creation."
default = false
}
##########################################
# Bucket Subpath #
##########################################
# This setting is meant for users who want to store all of their instance-level
# bucket's data at a specific path within their bucket. It can be set both for
# external buckets or the bucket created by this module.
variable "bucket_path" {
description = "path of where to store data for the instance-level bucket"
type = string
default = ""
}
##########################################
# K8s #
##########################################
variable "gke_machine_type" {
description = "Specifies the machine type for nodes in the GKE cluster. Defaults to null and value from deployment-size.tf is used"
type = string
default = null
}
variable "gke_min_node_count" {
type = number
description = "Initial number of nodes for the GKE cluster, if gke_max_node_count is set, this is the minimum number of nodes. Defaults to null and value from deployment-size.tf is used"
default = null
}
variable "gke_max_node_count" {
type = number
description = "Maximum number of nodes for the GKE cluster. Defaults to null and value from deployment-size.tf is used"
default = null
}
##########################################
# General Application #
##########################################
variable "disable_code_saving" {
type = bool
description = "Boolean indicating if code saving is disabled"
default = false
}
variable "other_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}
##########################################
# KMS #
##########################################
variable "sql_default_encryption" {
description = "Boolean to determine if a default SQL encryption key should be used. If true, a default key will be created. Takes precedence over `db_kms_key_id`."
type = bool
default = false
}
variable "bucket_default_encryption" {
description = "Boolean to determine if a default bucket encryption key should be used. If true, a default key will be created. Takes precedence over `bucket_kms_key_id`."
type = bool
default = false
}
variable "db_kms_key_id" {
description = "ID of the customer-provided SQL KMS key."
type = string
default = null
}
variable "bucket_kms_key_id" {
description = "ID of the customer-provided bucket KMS key."
type = string
default = null
}
variable "size" {
description = "Deployment size for the instance"
type = string
default = "small"
}
variable "weave_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}
variable "app_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}
variable "parquet_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}
##########################################
# private link #
##########################################
## In order to support private link required min version 0.13.0 of operator-wandb chart
variable "create_private_link" {
type = bool
description = "Whether to create a private link service."
default = false
}
variable "public_access" {
type = bool
description = "Whether to create a public endpoint for wandb access."
default = true
}
variable "allowed_project_names" {
type = map(number)
default = {
# "project_ID" = 4
}
description = "A map of allowed projects where each key is a project number and the value is the connection limit."
}
variable "psc_subnetwork_cidr" {
default = "192.168.0.0/24"
description = "Private link service reserved subnetwork"
type = string
}
variable "ilb_proxynetwork_cidr" {
default = "10.127.0.0/24"
description = "Internal load balancer proxy subnetwork"
type = string
}
variable "create_workload_identity" {
description = "Flag to indicate whether to create a workload identity for the service account."
type = bool
default = false
}
variable "enable_stackdriver" {
type = bool
default = false
}
variable "stackdriver_sa_name" {
type = string
default = "wandb-stackdriver"
}
###########################################
# ClickHouse endpoint #
###########################################
variable "clickhouse_private_endpoint_service_name" {
type = string
description = "ClickHouse private endpoint 'Service name' (ends in -clickhouse-cloud)."
default = ""
}
variable "clickhouse_region" {
type = string
description = "ClickHouse region (us-east1, us-central1, etc)."
default = ""
}
variable "clickhouse_subnetwork_cidr" {
default = "10.50.0.0/24"
description = "ClickHouse private service connect subnetwork"
type = string
}
###########################################
# Internal Service #
###########################################
variable "kubernetes_cluster_oidc_issuer_url" {
type = string
description = "OIDC issuer URL for the Kubernetes cluster. Can be determined using `kubectl get --raw /.well-known/openid-configuration`"
default = ""
}
variable "enable_private_gke_nodes" {
type = bool
default = false
description = "Enable private nodes for the GKE cluster. When set to true, nodes will not have public IPs, and Cloud NAT with a static public IP will be used for egress traffic. Ensure sufficient quota for static IPs in the specified region."
}