-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
979 lines (962 loc) · 30.4 KB
/
variables.tf
File metadata and controls
979 lines (962 loc) · 30.4 KB
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
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
variable "name" {
description = "Name to be used on all the resources as identifier"
type = string
default = ""
validation {
condition = length(var.name) > 0
error_message = "The name value must be a valid! Example: example-name"
}
}
variable "type" {
description = "Type of deployment: standalone, cluster, autoscale"
type = string
default = ""
validation {
condition = var.type == "standalone" || var.type == "cluster" || var.type == "autoscale"
error_message = "The type value must be a valid! Example: standalone, cluster, autoscale"
}
}
variable "path_to_red5pro_build" {
description = "Path to the Red5 Pro build zip file, absolute path or relative path. https://account.red5.net/downloads. Example: /home/ubuntu/terraform-aws-red5pro/red5pro-server-0.0.0.b0-release.zip"
type = string
default = ""
}
variable "aws_region" {
description = "AWS region to deploy the resources"
default = ""
}
# SSH key configuration
variable "ssh_key_use_existing" {
description = "Use existing SSH key pair or create a new one. true = use existing, false = create new"
type = bool
default = false
}
variable "ssh_key_name_existing" {
description = "SSH key name existing in AWS"
type = string
default = ""
}
variable "ssh_key_private_key_path_existing" {
description = "SSH private key path existing in local machine"
type = string
default = ""
}
# VPC configuration
variable "vpc_use_existing" {
description = "Use existing VPC or create a new one. true = use existing, false = create new"
type = bool
default = false
}
variable "vpc_id_existing" {
description = "VPC ID, this VPC should have minimum 2 public subnets."
type = string
default = "vpc-12345"
validation {
condition = length(var.vpc_id_existing) > 4 && substr(var.vpc_id_existing, 0, 4) == "vpc-"
error_message = "The vpc_id_existing value must be a valid! Example: vpc-12345"
}
}
# Elastic IP configuration for Stream Manager 2.0
variable "stream_manager_elastic_ip_use_existing" {
description = "Stream Manager 2.0 - Use existing elastic IP or create a new one. true = use existing, false = create new"
type = bool
default = false
}
variable "stream_manager_elastic_ip_existing" {
description = "Stream Manager 2.0 - Elastic IP Existing"
type = string
default = "1.2.3.4"
}
# Elastic IP configuration for Kafka
variable "standalone_elastic_ip_use_existing" {
description = "Standalone Red5 Pro - Use existing elastic IP or create a new one. true = use existing, false = create new"
type = bool
default = false
}
variable "standalone_elastic_ip_existing" {
description = "Standalone Red5 Pro - Elastic IP Existing"
type = string
default = "1.2.3.4"
}
# Red5 Pro standalone server configuration
variable "standalone_instance_type" {
description = "Red5 Pro standalone server instance type"
type = string
default = "t3.medium"
}
variable "standalone_volume_size" {
description = "Red5 Pro standalone server volume size"
type = number
default = 16
validation {
condition = var.standalone_volume_size >= 8
error_message = "The standalone_volume_size value must be a valid! Minimum 8"
}
}
variable "standalone_red5pro_inspector_enable" {
description = "Red5 Pro standalone server Inspector enable/disable (https://www.red5.net/docs/troubleshooting/inspector/overview/)"
type = bool
default = false
}
variable "standalone_red5pro_restreamer_enable" {
description = "Red5 Pro standalone server Restreamer enable/disable (https://www.red5.net/docs/special/restreamer/overview/)"
type = bool
default = false
}
variable "standalone_red5pro_socialpusher_enable" {
description = "Red5 Pro standalone server SocialPusher enable/disable (https://www.red5.net/docs/special/social-media-plugin/rest-api/)"
type = bool
default = false
}
variable "standalone_red5pro_suppressor_enable" {
description = "Red5 Pro standalone server Suppressor enable"
type = bool
default = false
}
variable "standalone_red5pro_hls_enable" {
description = "Red5 Pro standalone server HLS enable/disable (https://www.red5.net/docs/protocols/hls-plugin/overview/)"
type = bool
default = false
}
variable "standalone_red5pro_hls_output_format" {
description = "Red5 Pro standalone server - HLS output format. Options: TS, FMP4, SMP4"
type = string
default = "TS"
}
variable "standalone_red5pro_hls_dvr_playlist" {
description = "Red5 Pro standalone server - HLS DVR playlist"
type = string
default = "false"
}
variable "standalone_red5pro_webhooks_enable" {
description = "Red5 Pro standalone server Webhooks enable/disable (https://www.red5.net/docs/special/webhooks/overview/)"
type = bool
default = false
}
variable "standalone_red5pro_webhooks_endpoint" {
description = "Red5 Pro standalone server Webhooks endpoint"
type = string
default = ""
}
variable "standalone_red5pro_round_trip_auth_enable" {
description = "Round trip authentication on the red5pro server enable/disable - Auth server should be deployed separately (https://www.red5.net/docs/special/round-trip-auth/overview/)"
type = bool
default = false
}
variable "standalone_red5pro_round_trip_auth_host" {
description = "Round trip authentication server host"
type = string
default = ""
}
variable "standalone_red5pro_round_trip_auth_port" {
description = "Round trip authentication server port"
type = number
default = 3000
}
variable "standalone_red5pro_round_trip_auth_protocol" {
description = "Round trip authentication server protocol"
type = string
default = "http"
}
variable "standalone_red5pro_round_trip_auth_endpoint_validate" {
description = "Round trip authentication server endpoint for validate"
type = string
default = "/validateCredentials"
}
variable "standalone_red5pro_round_trip_auth_endpoint_invalidate" {
description = "Round trip authentication server endpoint for invalidate"
type = string
default = "/invalidateCredentials"
}
variable "standalone_red5pro_cloudstorage_enable" {
description = "Red5 Pro server cloud storage enable/disable (https://www.red5.net/docs/special/cloudstorage-plugin/aws-s3-cloud-storage/)"
type = bool
default = false
}
variable "standalone_red5pro_cloudstorage_aws_access_key" {
description = "Red5 Pro server cloud storage - AWS access key (S3 Bucket)"
type = string
default = ""
}
variable "standalone_red5pro_cloudstorage_aws_secret_key" {
description = "Red5 Pro server cloud storage - AWS secret key (S3 Bucket)"
type = string
default = ""
}
variable "standalone_red5pro_cloudstorage_aws_bucket_name" {
description = "Red5 Pro server cloud storage - AWS bucket name (S3 Bucket)"
type = string
default = ""
}
variable "standalone_red5pro_cloudstorage_aws_region" {
description = "Red5 Pro server cloud storage - AWS region (S3 Bucket)"
type = string
default = ""
}
variable "standalone_red5pro_cloudstorage_postprocessor_enable" {
description = "Red5 Pro server cloud storage - enable/disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)"
type = bool
default = false
}
variable "standalone_red5pro_cloudstorage_aws_bucket_acl_policy" {
description = "Red5 Pro server cloud storage - AWS bucket ACL policy (S3 Bucket). Example: none, public-read, authenticated-read, private, public-read-write"
type = string
default = "public-read"
}
variable "standalone_red5pro_stream_auto_record_enable" {
description = "Red5 Pro server - enable/disable broadcast stream auto record"
type = bool
default = false
}
variable "standalone_red5pro_coturn_enable" {
description = "Red5Pro server customized Coturn configuration"
type = bool
default = false
}
variable "standalone_red5pro_coturn_address" {
description = "Red5Pro server customized Coturn address. Example: stun:1.2.3.4:3478"
type = string
default = ""
}
variable "standalone_red5pro_efs_enable" {
description = "Red5 Pro server enable/disable EFS mount to record streams"
type = bool
default = false
}
variable "standalone_red5pro_efs_dns_name" {
description = "Red5 Pro server EFS DNS name"
type = string
default = ""
}
variable "standalone_red5pro_efs_mount_point" {
description = "Red5 Pro server EFS mount point"
type = string
default = "/usr/local/red5pro/webapps/live/streams"
}
variable "standalone_red5pro_brew_mixer_enable" {
description = "Red5 Pro server enable/disable brew mixer"
type = bool
default = false
}
# kafka configuration
variable "kafka_standalone_instance_create" {
description = "Create a new Kafka standalone instance true/false"
type = bool
default = false
}
variable "kafka_standalone_instance_type" {
description = "kafka instance type"
type = string
default = "t3.medium"
}
variable "kafka_standalone_volume_size" {
description = "value to set the volume size for kafka"
type = number
default = 24
validation {
condition = var.kafka_standalone_volume_size >= 8
error_message = "The kafka_standalone_volume_size value must be a valid! Minimum 8"
}
}
variable "kafka_standalone_instance_arhive_url" {
description = "Kafka standalone instance - archive URL"
type = string
default = "https://downloads.apache.org/kafka/3.9.2/kafka_2.13-3.9.2.tgz"
}
# HTTPS/SSL variables for standalone/cluster
variable "https_ssl_certificate" {
description = "Enable SSL (HTTPS) on the Standalone Red5 Pro server, Stream Manager 2.0 server or Stream Manager 2.0 Load Balancer"
type = string
default = "none"
validation {
condition = var.https_ssl_certificate == "none" || var.https_ssl_certificate == "letsencrypt" || var.https_ssl_certificate == "imported" || var.https_ssl_certificate == "existing"
error_message = "The https_ssl_certificate value must be a valid! Example: none, letsencrypt, imported"
}
}
variable "https_ssl_certificate_domain_name" {
description = "Certificate identity for Let's Encrypt, imported cert, or ACM lookup (existing). May be a wildcard (e.g. *.example.com). For cluster/autoscale, user-facing URLs and Traefik use stream_manager_public_hostname (a concrete FQDN covered by that cert), not this value."
type = string
default = ""
}
variable "https_ssl_certificate_email" {
description = "Email for SSL certificate (letsencrypt)"
type = string
default = ""
}
variable "https_ssl_certificate_cert_path" {
description = "Path to public certificate file (imported)"
type = string
default = ""
}
variable "https_ssl_certificate_fullchain_path" {
description = "Path to certificate chain file (imported)"
type = string
default = ""
}
variable "https_ssl_certificate_key_path" {
description = "Path to SSL key (imported)"
type = string
default = ""
}
# HTTPS/SSL variables for autoscaling
variable "stream_manager_instance_type" {
description = "value to set the instance type for stream manager"
type = string
default = "t3.xlarge"
}
variable "stream_manager_volume_size" {
description = "value to set the volume size for stream manager"
type = number
default = 24
validation {
condition = var.stream_manager_volume_size >= 8
error_message = "The stream_manager_volume_size value must be a valid! Minimum 8"
}
}
variable "stream_manager_autoscaling_desired_capacity" {
description = "value to set the desired capacity for stream manager autoscale"
type = number
default = 1
}
variable "stream_manager_autoscaling_minimum_capacity" {
description = "value to set the minimum capacity for stream manager autoscale"
type = number
default = 1
}
variable "stream_manager_autoscaling_maximum_capacity" {
description = "value to set the maximum capacity for stream manager autoscale"
type = number
default = 1
}
variable "stream_manager_auth_user" {
description = "value to set the user name for Stream Manager 2.0 authentication"
type = string
default = ""
}
variable "stream_manager_auth_password" {
description = "value to set the user password for Stream Manager 2.0 authentication"
type = string
default = ""
}
# Red5 Pro general configuration
variable "red5pro_license_key" {
description = "Red5 Pro license key (https://www.red5.net/docs/installation/installation/license-key/)"
type = string
default = ""
}
variable "red5pro_api_enable" {
description = "Red5 Pro Server API enable/disable (https://www.red5.net/docs/development/api/overview/)"
type = bool
default = true
}
variable "red5pro_api_key" {
description = "Red5 Pro standalone server API key"
type = string
default = ""
}
# Red5 Pro Node image configuration
variable "node_image_create" {
description = "Create new Node image true/false"
type = bool
default = false
}
variable "node_image_instance_type" {
description = "Node image - instance type"
type = string
default = "t3.medium"
}
variable "node_image_volume_size" {
description = "Node image - volume size"
type = number
default = 8
validation {
condition = var.node_image_volume_size >= 8
error_message = "The node_image_volume_size value must be a valid! Minimum 8"
}
}
# General configuration
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
variable "vpc_cidr_block" {
description = "CIDR block for the VPC"
type = string
default = "10.5.0.0/16"
}
variable "vpc_public_subnets" {
description = "A list of public subnets inside the VPC"
type = list(string)
default = ["10.5.0.0/22", "10.5.4.0/22", "10.5.8.0/22", "10.5.12.0/22", "10.5.16.0/22", "10.5.20.0/22", "10.5.24.0/22", "10.5.28.0/22", "10.5.32.0/22", "10.5.36.0/22", "10.5.40.0/22", "10.5.44.0/22"]
}
variable "security_group_stream_manager_ingress" {
description = "Security group for Stream Managers - ingress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "SSH"
from_port = "22"
to_port = "22"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "HTTP"
from_port = "80"
to_port = "80"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "HTTPS"
from_port = "443"
to_port = "443"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "Kafka"
from_port = "9092"
to_port = "9092"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
]
}
variable "security_group_stream_manager_egress" {
description = "Security group for Stream Managers - egress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "All egress traffic"
from_port = "-1"
to_port = "-1"
protocol = "-1"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
]
}
variable "security_group_kafka_ingress" {
description = "Security group for Kafka standalone instance - ingress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "SSH"
from_port = "22"
to_port = "22"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "Kafka"
from_port = "9092"
to_port = "9092"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
]
}
variable "security_group_kafka_egress" {
description = "Security group for Kafka standalone instance - egress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "All egress traffic"
from_port = "-1"
to_port = "-1"
protocol = "-1"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
]
}
variable "security_group_node_ingress" {
description = "Security group for Node - ingress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "SSH"
from_port = "22"
to_port = "22"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "HTTP"
from_port = "5080"
to_port = "5080"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "RTMP (TCP)"
from_port = "1935"
to_port = "1935"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "RTMPS (TCP)"
from_port = "1936"
to_port = "1936"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "Restreamer, SRT (TCP)"
from_port = "8000"
to_port = "8100"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "RTSP (TCP)"
from_port = "8554"
to_port = "8554"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "Restreamer, SRT (UDP)"
from_port = "8000"
to_port = "8100"
protocol = "udp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "WebRTC (UDP)"
from_port = "40000"
to_port = "65535"
protocol = "udp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
]
}
variable "security_group_node_egress" {
description = "Security group for Node - egress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "All egress traffic"
from_port = "-1"
to_port = "-1"
protocol = "-1"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
]
}
variable "security_group_standalone_ingress" {
description = "Security group for standalone Red5Pro server - ingress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "SSH"
from_port = "22"
to_port = "22"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "HTTP"
from_port = "5080"
to_port = "5080"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "HTTPS"
from_port = "443"
to_port = "443"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "RTMPS (TCP)"
from_port = "1936"
to_port = "1936"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "RTSP (TCP)"
from_port = "8554"
to_port = "8554"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "Restreamer, SRT (TCP)"
from_port = "8000"
to_port = "8100"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "RTMP (TCP)"
from_port = "1935"
to_port = "1935"
protocol = "tcp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "Restreamer, SRT (UDP)"
from_port = "8000"
to_port = "8001"
protocol = "udp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
{
description = "WebRTC (UDP)"
from_port = "40000"
to_port = "65535"
protocol = "udp"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
}
]
}
variable "security_group_standalone_egress" {
description = "Security group for standalone Red5Pro server - egress"
type = list(object({
description = string
from_port = string
to_port = string
protocol = string
cidr_block = string
ipv6_cidr_block = string
}))
default = [
{
description = "All egress traffic"
from_port = "-1"
to_port = "-1"
protocol = "-1"
cidr_block = "0.0.0.0/0"
ipv6_cidr_block = "::/0"
},
]
}
# Red5 Pro autoscale Node group - (Optional)
variable "node_group_create" {
description = "Create new node group. Linux or Mac OS only."
type = bool
default = false
}
variable "node_group_origins_min" {
description = "Number of minimum Origins"
type = number
default = 1
}
variable "node_group_origins_max" {
description = "Number of maximum Origins"
type = number
default = 20
}
variable "node_group_origins_instance_type" {
description = "Instance type for Origins"
type = string
default = "t3.medium"
}
variable "node_group_origins_volume_size" {
description = "Volume size in GB for Origins. Minimum 8GB"
type = number
default = 16
validation {
condition = var.node_group_origins_volume_size >= 8
error_message = "The node_group_origins_volume_size value must be a valid! Minimum 8"
}
}
variable "node_group_edges_min" {
description = "Number of minimum Edges"
type = number
default = 1
}
variable "node_group_edges_max" {
description = "Number of maximum Edges"
type = number
default = 40
}
variable "node_group_edges_instance_type" {
description = "Instance type for Edges"
type = string
default = "t3.medium"
}
variable "node_group_edges_volume_size" {
description = "Volume size in GB for Edges. Minimum 8GB"
type = number
default = 16
validation {
condition = var.node_group_edges_volume_size >= 8
error_message = "The node_group_edges_volume_size value must be a valid! Minimum 8"
}
}
variable "node_group_transcoders_min" {
description = "Number of minimum Transcoders"
type = number
default = 1
}
variable "node_group_transcoders_max" {
description = "Number of maximum Transcoders"
type = number
default = 20
}
variable "node_group_transcoders_instance_type" {
description = "Instance type for Transcoders"
type = string
default = "t3.medium"
}
variable "node_group_transcoders_volume_size" {
description = "Volume size in GB for Transcoders. Minimum 8GB"
type = number
default = 16
validation {
condition = var.node_group_transcoders_volume_size >= 8
error_message = "The node_group_transcoders_volume_size value must be a valid! Minimum 8"
}
}
variable "node_group_relays_min" {
description = "Number of minimum Relays"
type = number
default = 0
}
variable "node_group_relays_max" {
description = "Number of maximum Relays"
type = number
default = 20
}
variable "node_group_relays_instance_type" {
description = "Instance type for Relays"
type = string
default = "t3.medium"
}
variable "node_group_relays_volume_size" {
description = "Volume size in GB for Relays. Minimum 8GB"
type = number
default = 16
validation {
condition = var.node_group_relays_volume_size >= 8
error_message = "The node_group_relays_volume_size value must be a valid! Minimum 8"
}
}
variable "ubuntu_version_aws_image" {
type = map(string)
default = {
18.04 = "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"
20.04 = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"
22.04 = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"
}
}
variable "ubuntu_version" {
description = "Ubuntu version"
type = string
default = "22.04"
}
# Extra configuration for Red5 Pro autoscaling nodes
variable "node_config_webhooks" {
description = "Webhooks configuration - (Optional) https://www.red5.net/docs/special/webhooks/overview/"
type = object({
enable = bool
target_nodes = list(string)
webhook_endpoint = string
})
default = {
enable = false
target_nodes = []
webhook_endpoint = ""
}
}
variable "node_config_round_trip_auth" {
description = "Round trip authentication configuration - (Optional) https://www.red5.net/docs/special/authplugin/simple-auth/"
type = object({
enable = bool
target_nodes = list(string)
auth_host = string
auth_port = number
auth_protocol = string
auth_endpoint_validate = string
auth_endpoint_invalidate = string
})
default = {
enable = false
target_nodes = []
auth_host = ""
auth_port = "443"
auth_protocol = "https://"
auth_endpoint_validate = "/validateCredentials"
auth_endpoint_invalidate = "/invalidateCredentials"
}
}
variable "node_config_social_pusher" {
description = "Social Pusher configuration - (Optional) https://www.red5.net/docs/development/social-media-plugin/rest-api/"
type = object({
enable = bool
target_nodes = list(string)
})
default = {
enable = false
target_nodes = []
}
}
variable "node_config_restreamer" {
description = "Restreamer configuration - (Optional) https://www.red5.net/docs/special/restreamer/overview/"
type = object({
enable = bool
target_nodes = list(string)
restreamer_tsingest = bool
restreamer_ipcam = bool
restreamer_whip = bool
restreamer_srtingest = bool
})
default = {
enable = false
target_nodes = []
restreamer_tsingest = false
restreamer_ipcam = false
restreamer_whip = false
restreamer_srtingest = false
}
}
variable "stream_manager_proxy_user" {
description = "value to set the user name for Stream Manager 2.0 proxy"
type = string
default = ""
}
variable "stream_manager_proxy_password" {
description = "value to set the user password for Stream Manager 2.0 proxy"
type = string
default = ""
}
variable "stream_manager_spatial_user" {
description = "value to set the user name for Stream Manager 2.0 spatial"
type = string
default = ""
}
variable "stream_manager_spatial_password" {
description = "value to set the user password for Stream Manager 2.0 spatial"
type = string
default = ""
}
variable "stream_manager_container_registry" {
description = "value to set the container registry for Stream Manager 2.0 (Optional) Example: container-registry/my-repo"
type = string
default = ""
}
variable "stream_manager_container_registry_user" {
description = "value to set the user name for Stream Manager 2.0 container registry (Optional)"
type = string
default = ""
}
variable "stream_manager_container_registry_password" {
description = "value to set the user password for Stream Manager 2.0 container registry (Optional)"
type = string
default = ""
}
variable "stream_manager_version" {
description = "value to set the version for Stream Manager 2.0"
type = string
default = "latest"
}
variable "stream_manager_testbed_version" {
description = "value to set the version for Stream Manager 2.0 Testbed (Optional) - if not set it will use version from stream_manager_version variable"
type = string
default = ""
}
variable "stream_manager_admin_ui_version" {
description = "value to set the version for Stream Manager 2.0 Admin UI image (Optional) - if not set it will use version from stream_manager_version variable"
type = string
default = ""
}
variable "stream_manager_public_hostname" {
description = "Public FQDN for Stream Manager 2.0 (cluster/autoscale): TRAEFIK_HOST, admin UI API base, stream_manager_url_https, etc. Must be a real hostname (e.g. sm.example.com), not a wildcard. https_ssl_certificate_domain_name may still be *.example.com if this host is under that zone."
type = string
default = ""
}
variable "node_group_origins_connection_limit" {
description = "Connection limit for Origins (maximum number of publishers to the origin server)"
type = number
default = 20
}
variable "node_group_edges_connection_limit" {
description = "Connection limit for Edges (maximum number of subscribers to the edge server)"
type = number
default = 200
}
variable "node_group_transcoders_connection_limit" {
description = "Connection limit for Transcoders (maximum number of publishers to the transcoder server)"
type = number
default = 20
}