-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
446 lines (380 loc) · 13.2 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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
// --- RELEASE INFORMATION --- //
variable "config_release_name" {
description = "Open Targets Platform release name, not related to any configuration parameter."
type = string
}
// --- DEPLOYMENT CONFIGURATION --- //
// Terraform Backend Configuration --- //
variable "config_tf_backend_bucket_name" {
description = "Google Cloud Bucket where Terraform State is stored, default is 'none'"
type = string
default = "none"
}
variable "config_tf_backend_prefix" {
description = "Prefix for Terraformt State stored in the configured backend bucket, default is 'none'"
type = string
default = "none"
}
variable "config_gcp_default_region" {
description = "Default region when not specified in the module"
type = string
}
variable "config_gcp_default_zone" {
description = "Default zone when not specified in the module"
type = string
}
variable "config_project_id" {
description = "Default project to use when not specified in the module"
type = string
}
variable "config_deployment_regions" {
description = "A list of regions where to deploy the OT Platform"
type = list(string)
}
// --- Elastic Search Configuration --- //
variable "config_vm_elastic_search_image_project" {
description = "This allows to specify a different than deployment project for the deployed Elastic Search Instance image to be used."
type = string
default = "cos-cloud"
}
variable "config_vm_elastic_search_vcpus" {
description = "CPU count configuration for the deployed Elastic Search Instances, default '6'"
type = number
default = "6"
}
variable "config_vm_elastic_search_mem" {
description = "RAM configuration for the deployed Elastic Search Instances"
type = number
default = "39936"
}
variable "config_vm_elastic_search_image" {
description = "Disk image to use for the deployed Elastic Search Instances"
type = string
default = "cos-stable"
}
variable "config_vm_elastic_search_version" {
description = "Elastic search version to deploy"
type = string
}
variable "config_vm_elastic_search_boot_disk_size" {
description = "Boot disk size to use for the deployed Elastic Search Instances"
type = string
default = "16"
}
variable "config_vm_elastic_search_data_volume_image" {
description = "Elastic Search Data image name"
type = string
}
variable "config_vm_elastic_search_data_volume_image_project" {
description = "Elastic Search Data image project, default 'open-targets-eu-dev'"
type = string
default = "open-targets-eu-dev"
}
variable "config_vm_elasticsearch_flag_preemptible" {
description = "Use this flag for deploying Elastic Search nodes on preemptible VMs, default 'false'"
type = bool
default = false
}
// --- Clickhouse configuration --- //
variable "config_vm_clickhouse_vcpus" {
description = "CPU count for Clickhouse instances, default '4'"
type = number
default = "4"
}
variable "config_vm_clickhouse_mem" {
description = "Amount of memory allocated for Clickhouse instances, default '26624'"
type = number
default = "26624"
}
variable "config_vm_clickhouse_image" {
description = "Image to use for launching Clickhouse instances"
type = string
default = "cos-stable"
}
variable "config_vm_clickhouse_image_project" {
description = "Project where to find the instance image to use"
type = string
default = "cos-cloud"
}
variable "config_vm_clickhouse_docker_image" {
description = "Docker image to use for running Clickhouse"
type = string
default = "clickhouse/clickhouse-server"
}
variable "config_vm_clickhouse_docker_image_version" {
description = "Clickhouse docker image version to deploy, default '23.3.1.2823'"
type = string
default = "23.3.1.2823"
}
variable "config_vm_clickhouse_flag_preemptible" {
description = "Use this flag for deploying Clickhouse nodes on preemptible VMs, default 'false'"
type = bool
default = false
}
variable "config_vm_clickhouse_boot_disk_size" {
description = "Boot disk size to be used in Clickhouse instances"
type = string
default = "16GB"
}
variable "config_vm_clickhouse_data_volume_image" {
description = "Clickhouse Data image name"
type = string
}
variable "config_vm_clickhouse_data_volume_image_project" {
description = "Clickhouse Data image project, default 'open-targets-eu-dev'"
type = string
default = "open-targets-eu-dev"
}
// --- API Configuration --- //
variable "config_vm_platform_api_image_version" {
description = "Platform API docker image version to use"
type = string
}
variable "config_vm_api_vcpus" {
description = "CPU count for API nodes, default '2'"
type = number
default = "4"
}
variable "config_vm_api_mem" {
description = "Memory allocation for API VMs (MiB)"
type = number
default = "15360"
}
variable "config_vm_api_image" {
description = "VM image to use for running API nodes"
type = string
default = "cos-stable"
}
variable "config_vm_api_image_project" {
description = "Project hosting the API VM image"
type = string
default = "cos-cloud"
}
variable "config_vm_api_boot_disk_size" {
description = "Boot disk size for API VM nodes"
type = string
default = "10GB"
}
variable "config_vm_api_flag_preemptible" {
description = "Use this flag for deploying API nodes on preemptible VMs, default 'false'"
type = bool
default = false
}
// --- DNS Configuration --- //
variable "config_dns_project_id" {
description = "Project ID to use when making changes to Cloud DNS service"
type = string
}
variable "config_dns_subdomain_prefix" {
description = "DNS subdomain prefix to use for anything this deployment definition adds to the DNS information"
default = null
}
variable "config_dns_managed_zone_name" {
description = "Name of the Cloud DNS managed zone to use for DNS changes"
type = string
}
variable "config_dns_managed_zone_dns_name" {
description = "Domain name that is being managed in the given managed DNS zone, a.k.a. Cloud DNS -> Managed Zone -> DNS Name"
type = string
}
variable "config_dns_platform_api_subdomain" {
description = "Subdomain for platform API DNS entry, default 'api'"
type = string
default = "api"
}
variable "config_dns_platform_openai_api_subdomain" {
description = "Subdomain for Open Targets Platform OpenAI API DNS entry, default 'ai'"
type = string
default = "ai"
}
variable "config_dns_platform_subdomain" {
description = "Subdomain for Open Targets Platform Web App, default 'platform'"
type = string
default = "platform"
}
// --- WEB APP Configuration --- //
variable "config_webapp_repo_name" {
description = "Web Application repository name"
type = string
}
variable "config_webapp_release" {
description = "Release version of the web application to deploy"
type = string
}
variable "config_webapp_deployment_context_map" {
description = "A map with values for those parameters that need to be customized in the deployment of the web application, see module defaults as an example"
// In this iteration, we use 'any' type here, while we converge on the mapping model for the web application
type = any
}
variable "config_webapp_location" {
description = "This input parameter defines the location of the Web Application (bucket), default 'EU'"
type = string
default = "EU"
}
variable "config_webapp_robots_profile" {
description = "This input parameter defines the 'robots.txt' profile to be used when deploying the web application, default 'default', which means that no changes to existing 'robots.txt' file will be made"
type = string
default = "default"
}
variable "config_webapp_custom_profile" {
description = "Web application customisation profile to use, if not provided, the default set by the web app module will be used"
type = string
default = "default.js"
}
variable "config_webapp_bucket_name_data_assets" {
description = "Bucket where to find the data context for the web application"
type = string
}
variable "config_webapp_data_context_release" {
description = "Data context release for the web application"
type = string
}
variable "config_webapp_sitemaps_repo_name" {
description = "Name of the GitHub repository where to find the software that generates the sitemaps for the web application"
type = string
}
variable "config_webapp_sitemaps_release" {
description = "Sitemaps script release to use"
type = string
}
variable "config_webapp_sitemaps_bigquery_table" {
description = "BigQuery table to pull the sitemaps data from"
type = string
}
variable "config_webapp_sitemaps_bigquery_project" {
description = "Project hosting the BigQuery services"
type = string
}
// Web Application Web Servers --- //
variable "config_webapp_webserver_docker_image_version" {
description = "NginX Docker image version to use in deployment"
type = string
}
variable "config_webapp_webserver_vm_vcpus" {
description = "CPU count, default '1'"
type = number
default = "1"
}
variable "config_webapp_webserver_vm_mem" {
description = "Amount of memory allocated Web Server nodes (MiB), default '3840'"
type = number
default = "3840"
}
variable "config_webapp_webserver_vm_image" {
description = "VM image to use for Web Server nodes, default 'cos-stable'"
type = string
default = "cos-stable"
}
variable "config_webapp_webserver_vm_image_project" {
description = "Project hosting the VM image, default 'cos-cloud'"
type = string
default = "cos-cloud"
}
variable "config_webapp_webserver_vm_boot_disk_size" {
description = "Boot disk size for Web Server nodes, default '10GB'"
type = string
default = "10GB"
}
variable "config_vm_webserver_flag_preemptible" {
description = "Use this flag for deploying Web nodes on preemptible VMs, default 'false'"
type = bool
default = false
}
// --- Global Load Balancer --- //
variable "config_glb_webapp_enable_cdn" {
description = "This parameters indicates the GLB whether we want to use a CDN or not, default 'true'"
type = bool
default = false
}
variable "config_glb_openai_api_enable_cdn" {
description = "This parameters indicates the GLB whether we want to use a CDN or not for OpenAI API, default 'false'"
type = bool
default = false
}
// --- Network Security --- //
variable "config_security_api_enable" {
description = "Enable security policies for the platform API, default 'false'"
type = bool
default = true
}
variable "config_security_webapp_enable" {
description = "Enable security policies for the web application, default 'false'"
type = bool
default = true
}
variable "config_security_cidrs_allowed" {
description = "File that contains the listing of CIDRs allowed to access the platform, default 'netsec_cidr_allowed.default'"
type = string
default = "netsec_cidr_allowed.default"
}
variable "config_security_cidrs_blocked" {
description = "File that contains the listing of CIDRs prevented from accessing the platform, default 'netsec_cidr_blocked.default'"
type = string
default = "netsec_cidr_blocked.default"
}
// --- Development --- //
variable "config_set_dev_mode_on" {
description = "If 'true', it will set the deployment to 'development mode', default is 'false'"
default = false
}
variable "config_enable_inspection" {
description = "If 'true', it will deploy additional VMs for infrastructure inspection, 'false'"
default = false
}
// --- API metadata --- //
variable "config_vm_version_major" {
description = "Major API Version"
type = string
default = "0"
}
variable "config_vm_version_minor" {
description = "Minor API Version"
type = string
default = "0"
}
variable "config_vm_version_patch" {
description = "Patch API Version"
type = string
default = "0"
}
variable "config_vm_data_year" {
description = "API data - year"
type = string
default = "0"
}
variable "config_vm_data_month" {
description = "API data - month"
type = string
default = "0"
}
variable "config_vm_data_iteration" {
description = "API data - iteration"
type = string
default = "0"
}
variable "config_vm_api_ignore_cache" {
description = "Disable API caching"
type = bool
default = false
}
// --- OpenAI API --- //
variable "config_openai_api_docker_image_version" {
description = "OpenAI API Docker image version to use in deployment"
type = string
}
variable "config_openai_api_flag_preemptible" {
description = "Use this flag for deploying OpenAI API on preemptible VMs, default 'false'"
type = bool
default = true
}
variable "config_openai_credentials_filename" {
description = "Name of the file containing the OpenAI credentials"
type = string
default = "openai_credentials.txt"
}
// --- Credentials --- //
variable "config_credentials_local_path" {
description = "Local path to credentials repository, 'credentials' by default"
type = string
default = "credentials"
}