-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinputs.tf
792 lines (758 loc) · 25.4 KB
/
inputs.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
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
variable "environment" {
description = "Project environment."
type = string
validation {
condition = length(var.environment) <= 7
error_message = "The environment value must be 7 or fewer characters."
}
}
variable "project_name" {
description = "Project Name"
type = string
validation {
condition = length(var.project_name) <= 8
error_message = "The project_name value must be a 8 or fewer characters."
}
}
variable "vpc_id" {
type = string
description = "ID for the VPC"
default = ""
}
variable "vpc_cidr" {
type = string
description = "CIDR for the VPC"
default = ""
}
variable "public_subnets_az_to_id_map" {
type = map(any)
description = "Map with the availability zone to the subnet-id for public subnets. If deploy_vpc = true, then specify the map with az => subnet-cidr-range instead."
default = {}
}
variable "private_subnets_az_to_id_map" {
type = map(any)
description = "Map with the availability zone to the subnet-id for private subnets. If deploy_vpc = true, then specify the map with az => subnet-cidr-range instead."
default = {}
}
variable "security_group_id" {
type = string
description = "ID for the Security Group in the FilmDrop VPC"
default = ""
}
variable "sns_warning_subscriptions_map" {
type = map(any)
default = {}
}
variable "sns_critical_subscriptions_map" {
type = map(any)
default = {}
}
variable "s3_access_log_bucket" {
description = "FilmDrop S3 Access Log Bucket Name"
type = string
default = ""
}
variable "s3_logs_archive_bucket" {
description = "FilmDrop S3 Archive Log Bucket Name"
type = string
default = ""
}
variable "domain_zone" {
description = "The DNS zone id to add the record to."
type = string
}
variable "stac_server_inputs" {
description = "Inputs for stac-server FilmDrop deployment."
type = object({
app_name = string
version = string
deploy_cloudfront = bool
web_acl_id = string
domain_alias = string
enable_transactions_extension = bool
collection_to_index_mappings = string
opensearch_cluster_instance_type = string
opensearch_cluster_instance_count = number
opensearch_cluster_dedicated_master_enabled = bool
opensearch_cluster_dedicated_master_type = string
opensearch_cluster_dedicated_master_count = number
ingest_sns_topic_arns = list(string)
additional_ingest_sqs_senders_arns = list(string)
opensearch_ebs_volume_size = number
cors_origin = string
cors_credentials = bool
cors_methods = string
cors_headers = string
authorized_s3_arns = list(string)
api_rest_type = string
api_lambda = optional(object({
handler = optional(string)
memory_mb = optional(number)
runtime = optional(string)
timeout_seconds = optional(number)
zip_filepath = optional(string)
}))
ingest_lambda = optional(object({
handler = optional(string)
memory_mb = optional(number)
runtime = optional(string)
timeout_seconds = optional(number)
zip_filepath = optional(string)
}))
pre_hook_lambda = optional(object({
handler = optional(string)
memory_mb = optional(number)
runtime = optional(string)
timeout_seconds = optional(number)
zip_filepath = optional(string)
}))
auth_function = object({
cf_function_name = string
cf_function_runtime = string
cf_function_code_path = string
attach_cf_function = bool
cf_function_event_type = string
create_cf_function = bool
create_cf_basicauth_function = bool
cf_function_arn = string
})
ingest = object({
source_catalog_url = string
destination_collections_list = string
destination_collections_min_lat = number
destination_collections_min_long = number
destination_collections_max_lat = number
destination_collections_max_long = number
date_start = string
date_end = string
include_historical_ingest = bool
source_sns_arn = string
include_ongoing_ingest = bool
})
})
default = {
app_name = "stac_server"
version = "v3.8.0"
deploy_cloudfront = true
web_acl_id = ""
domain_alias = ""
enable_transactions_extension = false
collection_to_index_mappings = ""
opensearch_cluster_instance_type = "t3.small.search"
opensearch_cluster_instance_count = 3
opensearch_cluster_dedicated_master_enabled = true
opensearch_cluster_dedicated_master_type = "t3.small.search"
opensearch_cluster_dedicated_master_count = 3
ingest_sns_topic_arns = []
additional_ingest_sqs_senders_arns = []
opensearch_ebs_volume_size = 35
cors_origin = ""
cors_credentials = false
cors_methods = ""
cors_headers = ""
authorized_s3_arns = []
api_rest_type = "EDGE"
api_lambda = null
ingest_lambda = null
pre_hook_lambda = null
auth_function = {
cf_function_name = ""
cf_function_runtime = "cloudfront-js-2.0"
cf_function_code_path = ""
attach_cf_function = false
cf_function_event_type = "viewer-request"
create_cf_function = false
create_cf_basicauth_function = false
cf_function_arn = ""
}
ingest = {
source_catalog_url = ""
destination_collections_list = ""
destination_collections_min_lat = -90
destination_collections_min_long = -180
destination_collections_max_lat = 90
destination_collections_max_long = 180
date_start = ""
date_end = ""
include_historical_ingest = false
source_sns_arn = ""
include_ongoing_ingest = false
}
}
}
variable "titiler_inputs" {
description = "Inputs for titiler FilmDrop deployment."
type = object({
app_name = string
domain_alias = string
deploy_cloudfront = bool
version = string
authorized_s3_arns = list(string)
mosaic_titiler_waf_allowed_url = string
mosaic_titiler_host_header = string
mosaic_tile_timeout = number
web_acl_id = string
auth_function = object({
cf_function_name = string
cf_function_runtime = string
cf_function_code_path = string
attach_cf_function = bool
cf_function_event_type = string
create_cf_function = bool
create_cf_basicauth_function = bool
cf_function_arn = string
})
})
default = {
app_name = "titiler"
domain_alias = ""
deploy_cloudfront = true
version = "v0.14.0-1.0.5"
authorized_s3_arns = []
mosaic_titiler_waf_allowed_url = ""
mosaic_titiler_host_header = ""
mosaic_tile_timeout = 30
web_acl_id = ""
auth_function = {
cf_function_name = ""
cf_function_runtime = "cloudfront-js-2.0"
cf_function_code_path = ""
attach_cf_function = false
cf_function_event_type = "viewer-request"
create_cf_function = false
create_cf_basicauth_function = false
cf_function_arn = ""
}
}
}
variable "analytics_inputs" {
description = "Inputs for analytics FilmDrop deployment."
type = object({
app_name = string
domain_alias = string
web_acl_id = string
jupyterhub_elb_acm_cert_arn = string
jupyterhub_elb_domain_alias = string
create_credentials = bool
auth_function = object({
cf_function_name = string
cf_function_runtime = string
cf_function_code_path = string
attach_cf_function = bool
cf_function_event_type = string
create_cf_function = bool
create_cf_basicauth_function = bool
cf_function_arn = string
})
cleanup = object({
enabled = bool
asg_min_capacity = number
analytics_node_limit = number
notifications_schedule_expressions = list(string)
cleanup_schedule_expressions = list(string)
})
eks = object({
cluster_version = string
autoscaler_version = string
})
})
default = {
app_name = "analytics"
domain_alias = ""
web_acl_id = ""
jupyterhub_elb_acm_cert_arn = ""
jupyterhub_elb_domain_alias = ""
create_credentials = true
auth_function = {
cf_function_name = ""
cf_function_runtime = "cloudfront-js-2.0"
cf_function_code_path = ""
attach_cf_function = false
cf_function_event_type = "viewer-request"
create_cf_function = false
create_cf_basicauth_function = false
cf_function_arn = ""
}
cleanup = {
enabled = false
asg_min_capacity = 1
analytics_node_limit = 4
notifications_schedule_expressions = []
cleanup_schedule_expressions = []
}
eks = {
cluster_version = "1.29"
autoscaler_version = "v1.29.0"
}
}
}
variable "console_ui_inputs" {
description = "Inputs for console-ui FilmDrop deployment."
type = object({
app_name = string
domain_alias = string
deploy_cloudfront = bool
web_acl_id = string
custom_error_response = list(object({
error_caching_min_ttl = string
error_code = string
response_code = string
response_page_path = string
}))
version = string
filmdrop_ui_config_file = string
filmdrop_ui_logo_file = string
filmdrop_ui_logo = string
auth_function = object({
cf_function_name = string
cf_function_runtime = string
cf_function_code_path = string
attach_cf_function = bool
cf_function_event_type = string
create_cf_function = bool
create_cf_basicauth_function = bool
cf_function_arn = string
})
})
default = {
app_name = "console"
domain_alias = ""
deploy_cloudfront = true
web_acl_id = ""
custom_error_response = [
{
error_caching_min_ttl = "10"
error_code = "404"
response_code = "200"
response_page_path = "/"
}
]
version = "v5.3.0"
filmdrop_ui_config_file = "./profiles/console-ui/default-config/config.dev.json"
filmdrop_ui_logo_file = "./profiles/console-ui/default-config/logo.png"
filmdrop_ui_logo = "bm9uZQo=" # Base64: 'none'
auth_function = {
cf_function_name = ""
cf_function_runtime = "cloudfront-js-2.0"
cf_function_code_path = ""
attach_cf_function = false
cf_function_event_type = "viewer-request"
create_cf_function = false
create_cf_basicauth_function = false
cf_function_arn = ""
}
}
}
variable "cirrus_inputs" {
description = "Inputs for FilmDrop Cirrus deployment."
type = object({
data_bucket = string
payload_bucket = string
log_level = string
api_rest_type = string
deploy_alarms = bool
custom_alarms = object({
warning = map(any)
critical = map(any)
})
process = object({
sqs_timeout = number
sqs_max_receive_count = number
})
state = object({
timestream_magnetic_store_retention_period_in_days = number
timestream_memory_store_retention_period_in_hours = number
})
lambda_zip_filepath = optional(string)
api_lambda = object({
timeout = number
memory = number
})
process_lambda = object({
timeout = number
memory = number
reserved_concurrency = number
})
update_state_lambda = object({
timeout = number
memory = number
})
pre_batch_lambda = object({
timeout = number
memory = number
})
post_batch_lambda = object({
timeout = number
memory = number
})
task_batch_compute = optional(list(object({
name = string
batch_compute_environment_existing = optional(object({
name = string
is_fargate = bool
}))
batch_compute_environment = optional(object({
compute_resources = object({
max_vcpus = number
type = string
allocation_strategy = optional(string)
bid_percentage = optional(number)
desired_vcpus = optional(number)
ec2_configuration = optional(object({
image_id_override = optional(string)
image_type = optional(string)
}))
ec2_key_pair = optional(string)
instance_type = optional(list(string))
min_vcpus = optional(number)
placement_group = optional(string)
security_group_ids = optional(list(string))
subnets = optional(list(string))
})
state = optional(string)
type = optional(string)
update_policy = optional(object({
job_execution_timeout_minutes = number
terminate_jobs_on_update = bool
}))
}))
batch_job_queue_existing = optional(object({
name = string
}))
batch_job_queue = optional(object({
fair_share_policy = optional(object({
compute_reservation = optional(number)
share_decay_seconds = optional(number)
share_distributions = list(object({
share_identifier = string
weight_factor = number
}))
}))
state = optional(string)
}))
ec2_launch_template_existing = optional(object({
name = string
}))
ec2_launch_template = optional(object({
user_data = optional(string)
ebs_optimized = optional(bool)
block_device_mappings = optional(list(object({
device_name = string
no_device = optional(bool)
virtual_name = optional(string)
ebs = optional(object({
delete_on_termination = optional(bool)
encrypted = optional(bool)
iops = optional(string)
kms_key_id = optional(string)
snapshot_id = optional(string)
throughput = optional(number)
volume_size = optional(number)
volume_type = optional(string)
}))
})))
}))
})))
tasks = optional(list(object({
name = string
common_role_statements = optional(list(object({
sid = string
effect = string
actions = list(string)
resources = list(string)
not_actions = optional(list(string))
not_resources = optional(list(string))
condition = optional(object({
test = string
variable = string
values = list(string)
}))
principals = optional(object({
type = string
identifiers = list(string)
}))
not_principals = optional(object({
type = string
identifiers = list(string)
}))
})))
lambda = optional(object({
description = optional(string)
ecr_image_uri = optional(string)
filename = optional(string)
image_config = optional(object({
command = optional(list(string))
entry_point = optional(list(string))
working_directory = optional(string)
}))
s3_bucket = optional(string)
s3_key = optional(string)
handler = optional(string)
runtime = optional(string)
timeout_seconds = optional(number)
memory_mb = optional(number)
ephemeral_storage_mb = optional(number)
publish = optional(bool)
architectures = optional(list(string))
env_vars = optional(map(string))
vpc_enabled = optional(bool)
role_statements = optional(list(object({
sid = string
effect = string
actions = list(string)
resources = list(string)
not_actions = optional(list(string))
not_resources = optional(list(string))
condition = optional(object({
test = string
variable = string
values = list(string)
}))
principals = optional(object({
type = string
identifiers = list(string)
}))
not_principals = optional(object({
type = string
identifiers = list(string)
}))
})))
alarms = optional(list(object({
critical = bool
statistic = string
metric_name = string
comparison_operator = string
threshold = number
period = optional(number, 60)
evaluation_periods = optional(number, 5)
})))
}))
batch = optional(object({
task_batch_compute_name = string
container_properties = string
retry_strategy = optional(object({
attempts = number
evaluate_on_exit = optional(list(object({
action = string
on_exit_code = optional(string)
on_reason = optional(string)
on_status_reason = optional(string)
})))
}))
parameters = optional(map(string))
role_statements = optional(list(object({
sid = string
effect = string
actions = list(string)
resources = list(string)
not_actions = optional(list(string))
not_resources = optional(list(string))
condition = optional(object({
test = string
variable = string
values = list(string)
}))
principals = optional(object({
type = string
identifiers = list(string)
}))
not_principals = optional(object({
type = string
identifiers = list(string)
}))
})))
scheduling_priority = optional(number)
timeout_seconds = optional(number)
}))
})))
workflows = optional(list(object({
name = string
non_cirrus_lambda_arns = optional(list(string))
template_filepath = string
template_variables = optional(map(object({
task_name = string
task_type = string
task_attr = string
})))
})))
})
default = {
data_bucket = "cirrus-data-bucket-name"
payload_bucket = "cirrus-payload-bucket-name"
log_level = "INFO"
api_rest_type = "EDGE"
deploy_alarms = true
custom_alarms = {
warning = {}
critical = {}
}
process = {
sqs_timeout = 180
sqs_max_receive_count = 5
}
state = {
timestream_magnetic_store_retention_period_in_days = 93
timestream_memory_store_retention_period_in_hours = 24
}
lambda_zip_filepath = null
api_lambda = {
timeout = 10
memory = 128
}
process_lambda = {
timeout = 10
memory = 128
reserved_concurrency = 16
}
update_state_lambda = {
timeout = 15
memory = 128
}
pre_batch_lambda = {
timeout = 15
memory = 128
}
post_batch_lambda = {
timeout = 15
memory = 128
}
task_batch_compute = []
tasks = []
workflows = []
}
}
variable "cirrus_dashboard_inputs" {
description = "Inputs for cirrus dashboard FilmDrop deployment."
type = object({
app_name = string
domain_alias = string
deploy_cloudfront = bool
web_acl_id = string
version = string
cirrus_api_endpoint = string
metrics_api_endpoint = string
custom_error_response = list(object({
error_caching_min_ttl = string
error_code = string
response_code = string
response_page_path = string
}))
auth_function = object({
cf_function_name = string
cf_function_runtime = string
cf_function_code_path = string
attach_cf_function = bool
cf_function_event_type = string
create_cf_function = bool
create_cf_basicauth_function = bool
cf_function_arn = string
})
})
default = {
app_name = "dashboard"
domain_alias = ""
deploy_cloudfront = true
web_acl_id = ""
version = "v0.5.1"
cirrus_api_endpoint = ""
metrics_api_endpoint = ""
custom_error_response = [
{
error_caching_min_ttl = "10"
error_code = "404"
response_code = "200"
response_page_path = "/"
}
]
auth_function = {
cf_function_name = ""
cf_function_runtime = "cloudfront-js-2.0"
cf_function_code_path = ""
attach_cf_function = false
cf_function_event_type = "viewer-request"
create_cf_function = false
create_cf_basicauth_function = false
cf_function_arn = ""
}
}
}
variable "deploy_vpc" {
type = bool
default = false
description = "Deploy FilmDrop VPC stack"
}
variable "deploy_vpc_search" {
type = bool
default = true
description = "Perform a FilmDrop VPC search"
}
variable "deploy_log_archive" {
type = bool
default = true
description = "Deploy FilmDrop Log Archive Bucket"
}
variable "deploy_stac_server" {
type = bool
default = true
description = "Deploy FilmDrop Stac-Server"
}
variable "deploy_stac_server_opensearch_serverless" {
type = bool
default = false
description = "Deploy FilmDrop Stac-Server with OpenSearch Serverless. If False, Stac-server will be deployed with a classic OpenSearch domain."
}
variable "deploy_stac_server_outside_vpc" {
type = bool
default = false
description = "Deploy FilmDrop Stac-Server resources, including OpenSearch outside VPC. Defaults to false. If False, Stac-server resources will be deployed within the vpc."
}
variable "deploy_analytics" {
type = bool
default = true
description = "Deploy FilmDrop Analytics stack"
}
variable "deploy_titiler" {
type = bool
default = true
description = "Deploy FilmDrop TiTiler stack"
}
variable "deploy_console_ui" {
type = bool
default = true
description = "Deploy FilmDrop Console UI stack"
}
variable "deploy_cirrus" {
type = bool
default = true
description = "Deploy FilmDrop Cirrus stack"
}
variable "deploy_cirrus_dashboard" {
type = bool
default = true
description = "Deploy FilmDrop Cirrus Dashboard stack"
}
variable "deploy_local_stac_server_artifacts" {
description = "Deploy STAC Server artifacts for local deploy"
type = bool
default = true
}
variable "deploy_waf_rule" {
description = "Deploy FilmDrop WAF rule"
type = bool
default = true
}
variable "ip_blocklist" {
description = "List of ip cidr ranges to block access to. "
type = set(string)
default = []
}
variable "whitelist_ips" {
description = "List of ips to filter access for."
type = set(string)
default = []
}
variable "ext_web_acl_id" {
description = "The id of the external WAF resource to attach to the FilmDrop CloudFront Endpoints."
type = string
default = ""
}