forked from IndicoDataSolutions/tf_cod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
658 lines (542 loc) · 13.6 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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
variable "is_azure" {
type = bool
default = false
}
variable "is_aws" {
type = bool
default = true
}
variable "label" {
type = string
default = "indico"
description = "The unique string to be prepended to resources names"
}
variable "message" {
type = string
default = "Managed by Terraform"
description = "The commit message for updates"
}
variable "harbor_pull_secret_b64" {
sensitive = true
type = string
description = "Harbor pull secret from Vault"
}
variable "applications" {
type = map(object({
name = string
repo = string
chart = string
version = string
values = string,
namespace = string,
createNamespace = bool,
vaultPath = string
}))
default = {}
}
# top level variable declarations
variable "region" {
type = string
default = "us-east-1"
description = "The AWS region in which to launch the indico stack"
}
variable "aws_access_key" {
type = string
description = "The AWS access key to use for deployment"
sensitive = true
}
variable "aws_secret_key" {
type = string
description = "The AWS secret key to use for deployment"
sensitive = true
}
variable "direct_connect" {
type = bool
default = false
description = "Sets up the direct connect configuration if true; else use public subnets"
}
variable "additional_tags" {
type = map(string)
default = null
description = "Additonal tags to add to each resource"
}
variable "default_tags" {
type = map(string)
default = null
description = "Default tags to add to each resource"
}
### networking variables
variable "vpc_cidr" {
type = string
description = "The VPC for the entire indico stack"
}
variable "public_ip" {
type = bool
default = true
description = "Should the cluster manager have a public IP assigned"
}
variable "user_ip" {
type = string
default = ""
description = "The IP address to allow SSH access for"
}
variable "vpc_name" {
type = string
default = "indico_vpc"
description = "The VPC name"
}
variable "private_subnet_cidrs" {
type = list(string)
description = "CIDR ranges for the private subnets"
}
variable "public_subnet_cidrs" {
type = list(string)
description = "CIDR ranges for the public subnets"
}
variable "subnet_az_zones" {
type = list(string)
description = "Availability zones for the subnets"
}
### storage
variable "storage_gateway_size" {
type = string
default = "m5.xlarge"
description = "The size of the storage gateway VM"
}
### database
variable "bucket_versioning" {
type = bool
default = true
description = "Enable bucket object versioning"
}
variable "submission_expiry" {
type = number
description = "The number of days to retain submissions"
default = 30
}
variable "uploads_expiry" {
type = number
description = "The number of days to retain uploads"
default = 30
}
variable "multi_az" {
type = bool
default = true
description = "Enable a multi-availability zone deployment"
}
### cluster
variable "name" {
type = string
default = "indico"
description = "Name to use in all cluster resources names"
}
variable "cluster_name" {
type = string
default = "indico-cluster"
description = "Name of the EKS cluster"
}
variable "cluster_version" {
type = string
default = "1.23"
description = "The EKS version to use"
}
variable "node_groups" {
}
variable "node_bootstrap_arguments" {
default = ""
description = "Additional arguments when bootstrapping the EKS node."
}
variable "node_user_data" {
default = ""
description = "Additional user data used when bootstrapping the EC2 instance."
}
variable "node_disk_size" {
default = "150"
description = "The root device size for the worker nodes."
}
variable "cluster_node_policies" {
type = list(any)
default = []
description = "Additonal IAM policies to add to the cluster IAM role"
}
variable "kms_encrypt_secrets" {
type = bool
default = true
description = "Encrypt EKS secrets with KMS"
}
# ReadAPI stuff
variable "enable_readapi" {
type = bool
default = true
}
variable "azure_indico_io_client_id" {
type = string
}
variable "azure_indico_io_client_secret" {
type = string
}
variable "azure_indico_io_subscription_id" {
type = string
}
variable "azure_indico_io_tenant_id" {
type = string
}
# IAM
variable "cluster_manager_iam_role" {
type = string
default = null
description = "Name of the IAM role to assign to the cluster manager EC2 instance; will be created if not supplied"
}
variable "eks_cluster_iam_role" {
type = string
default = null
description = "Name of the IAM role to assign to the EKS cluster; will be created if not supplied"
}
variable "eks_cluster_nodes_iam_role" {
type = string
default = null
description = "Name of the IAM role to assign to the EKS cluster nodes; will be created if not supplied"
}
# FSx storage capacity for wrx volume
variable "storage_capacity" {
type = number
default = 1200
description = "Storage capacity in GiB for RWX FSx"
}
variable "deletion_protection_enabled" {
type = bool
default = true
description = "Enable deletion protection if set to true"
}
variable "skip_final_snapshot" {
type = bool
default = false
description = "Skip taking a final snapshot before deletion; not recommended to enable"
}
variable "per_unit_storage_throughput" {
type = number
default = 100
description = "Throughput for each 1 TiB or storage (max 200) for RWX FSx"
}
variable "node_group_multi_az" {
type = bool
default = true
description = "Enable a multi-availability zone deployment for nodes"
}
variable "snapshot_id" {
type = string
default = ""
description = "The ebs snapshot of read-only data to use"
}
variable "include_rox" {
type = bool
default = false
description = "Create a read only FSx file system"
}
variable "assumed_roles" {
type = list(string)
default = null
description = "list of ARNs to be put in the trust relationship for the cluster manager role"
}
variable "aws_account" {
type = string
description = "The Name of the AWS Acccount this cluster lives in"
}
variable "argo_host" {
type = string
default = "argo.devops.indico.io"
}
variable "argo_username" {
sensitive = true
default = "admin"
}
variable "argo_password" {
sensitive = true
}
variable "argo_repo" {
description = "Argo Github Repository containing the IPA Application"
}
variable "argo_branch" {
description = "Branch to use on argo_repo"
}
variable "argo_path" {
description = "Path within the argo_repo containing yaml"
default = "."
}
variable "argo_github_team_owner" {
description = "The GitHub Team that has owner-level access to this Argo Project"
type = string
default = "devops-core-admins" # any group other than devops-core
}
variable "ipa_repo" {
type = string
default = "https://harbor.devops.indico.io/chartrepo/indico-charts"
}
variable "ipa_version" {
type = string
default = "0.12.1"
}
variable "ipa_smoketest_values" {
type = string
default = "Cg==" # empty newline string
}
variable "ipa_smoketest_repo" {
type = string
default = "https://harbor.devops.indico.io/chartrepo/indico-charts"
}
variable "ipa_smoketest_container_tag" {
type = string
default = "IPA-5.4-e1c5af3d"
}
variable "ipa_smoketest_version" {
type = string
default = "0.1.8"
}
variable "ipa_smoketest_slack_channel" {
type = string
default = "cod-smoketest-results"
}
variable "ipa_smoketest_enabled" {
type = bool
default = true
}
variable "ipa_smoketest_cronjob_enabled" {
type = bool
default = false
}
variable "ipa_smoketest_cronjob_schedule" {
type = string
default = "0 0 * * *" # every night at midnight
}
variable "monitoring_version" {
type = string
default = "0.3.3"
}
variable "ipa_pre_reqs_version" {
type = string
default = "0.4.0"
}
variable "ipa_crds_version" {
type = string
default = "0.2.1"
}
variable "ipa_enabled" {
type = bool
default = true
}
variable "ipa_values" {
type = string
default = ""
}
variable "git_pat" {
type = string
sensitive = true
default = ""
}
variable "vault_address" {
type = string
default = "https://vault.devops.indico.io"
}
variable "vault_username" {}
variable "vault_password" {
sensitive = true
}
variable "sqs_sns" {
type = bool
default = true
description = "Flag for enabling SQS/SNS"
}
variable "restore_snapshot_enabled" {
default = false
type = bool
description = "Flag for restoring cluster from snapshot"
}
variable "restore_snapshot_name" {
type = string
default = ""
description = "Name of snapshot in account's s3 bucket"
}
## OIDC Configuration
variable "oidc_enabled" {
type = bool
default = true
description = "Enable OIDC Auhentication"
}
variable "oidc_client_id" {
default = "kube-oidc-proxy"
}
variable "oidc_config_name" {
default = "indico-google-ws"
}
variable "oidc_issuer_url" {
default = "https://keycloak.devops.indico.io/auth/realms/GoogleAuth"
}
variable "oidc_groups_prefix" {
default = "oidcgroup:"
}
variable "oidc_groups_claim" {
default = "groups"
}
variable "oidc_username_prefix" {
default = "oidcuser:"
}
variable "oidc_username_claim" {
default = "sub"
}
variable "monitoring_enabled" {
type = bool
default = true
}
variable "hibernation_enabled" {
type = bool
default = false
}
variable "keda_version" {
default = "2.8.1"
}
variable "opentelemetry-collector_version" {
default = "0.30.0"
}
variable "include_fsx" {
type = bool
default = false
description = "Create a fsx file system(s)"
}
variable "include_pgbackup" {
type = bool
default = true
description = "Create a read only FSx file system"
}
variable "include_efs" {
type = bool
default = true
description = "Create efs"
}
#Added to support dop-1500 - QA needs programmatic access to push data to the s3 bucket indico-locust-benchmark-test-results in us-east-2.
variable "performance_bucket" {
type = bool
default = false
description = "Add permission to connect to indico-locust-benchmark-test-results"
}
variable "crds-values-yaml-b64" {
default = "Cg=="
}
variable "pre-reqs-values-yaml-b64" {
default = "Cg=="
}
variable "k8s_dashboard_chart_version" {
default = "0.1.0"
}
variable "enable_k8s_dashboard" {
type = bool
default = true
}
variable "use_acm" {
type = bool
default = false
description = "create cluster that will use acm"
}
variable "terraform_vault_mount_path" {
type = string
default = "terraform"
}
variable "snowflake_region" {
default = "us-east-2.aws"
type = string
description = "region the snowflake instance resides"
}
variable "snowflake_username" {
default = "tf-snow"
type = string
description = "snowflake master username"
}
variable "snowflake_account" {
default = "ZL54998"
type = string
description = "account identifier"
}
variable "snowflake_private_key" {
default = null
type = string
description = "Private Key for username+private-key snowflake auth"
}
variable "snowflake_db_name" {
type = string
default = "INDICO_DEV"
description = "the db name that snowflake resources will be connected with"
}
variable "enable_weather_station" {
type = bool
default = false
description = "whether or not to enable the weather station internal metrics collection service"
}
variable "aws_primary_dns_role_arn" {
type = string
default = ""
description = "The AWS arn for the role needed to manage route53 DNS in a different account."
}
variable "alternate_domain" {
type = string
default = ""
description = "Optional alternate domain to use with cluster."
}
variable "alerting_enabled" {
type = bool
default = false
description = "enable alerts"
}
variable "alerting_slack_enabled" {
type = bool
default = false
description = "enable alerts via slack"
}
variable "alerting_pagerduty_enabled" {
type = bool
default = false
description = "enable alerts via pagerduty"
}
variable "alerting_email_enabled" {
type = bool
default = false
description = "enable alerts via email"
}
variable "alerting_slack_token" {
type = string
default = "blank"
description = "Secret url with embedded token needed for slack webhook delivery."
}
variable "alerting_slack_channel" {
type = string
default = "blank"
description = "Slack channel for sending notifications from alertmanager."
}
variable "alerting_pagerduty_integration_key" {
type = string
default = "blank"
description = "Secret pagerduty_integration_key."
}
variable "alerting_email_from" {
type = string
default = "blank"
description = "alerting_email_from."
}
variable "alerting_email_to" {
type = string
default = "blank"
description = "alerting_email_to"
}
variable "alerting_email_host" {
type = string
default = "blank"
description = "alerting_email_host"
}
variable "alerting_email_username" {
type = string
default = "blank"
description = "alerting_email_username"
}
variable "alerting_email_password" {
type = string
default = "blank"
description = "alerting_email_password"
}