forked from cloudposse/terraform-aws-ecs-web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
1047 lines (879 loc) · 33.8 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
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
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
variable "region" {
type = string
description = "AWS Region for S3 bucket"
default = null
}
variable "codepipeline_enabled" {
type = bool
description = "A boolean to enable/disable AWS Codepipeline and ECR"
default = true
}
variable "codepipeline_cdn_bucket_id" {
type = string
default = null
description = "Optional bucket for static asset deployment. If specified, the buildspec must include a secondary artifacts section which controls the files deployed to the bucket [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html)"
}
variable "codepipeline_cdn_bucket_encryption_enabled" {
type = bool
default = false
description = "If set to true, enable encryption on the optional CDN asset deployment bucket"
}
variable "codepipeline_cdn_bucket_buildspec_identifier" {
type = string
default = null
description = "Identifier for buildspec section controlling the optional CDN asset deployment."
}
variable "use_ecr_image" {
type = bool
description = "If true, use ECR repo URL for image, otherwise use value in container_image"
default = false
}
variable "container_image" {
type = string
description = "The default container image to use in container definition"
default = "cloudposse/default-backend"
}
variable "container_repo_credentials" {
type = map(string)
default = null
description = "Container repository credentials; required when using a private repo. This map currently supports a single key; \"credentialsParameter\", which should be the ARN of a Secrets Manager's secret holding the credentials"
}
variable "ecr_scan_images_on_push" {
type = bool
description = "Indicates whether images are scanned after being pushed to the repository (true) or not (false)"
default = false
}
variable "container_cpu" {
type = number
description = "The vCPU setting to control cpu limits of container. (If FARGATE launch type is used below, this must be a supported vCPU size from the table here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html)"
default = 256
}
variable "container_memory" {
type = number
description = "The amount of RAM to allow container to use in MB. (If FARGATE launch type is used below, this must be a supported Memory size from the table here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html)"
default = 512
}
variable "container_start_timeout" {
type = number
description = "Time duration (in seconds) to wait before giving up on resolving dependencies for a container"
default = 30
}
variable "container_stop_timeout" {
type = number
description = "Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own"
default = 30
}
variable "network_mode" {
type = string
description = "The network mode to use for the task. This is required to be `awsvpc` for `FARGATE` `launch_type` or `null` for `EC2` `launch_type`"
default = "awsvpc"
}
variable "task_cpu" {
type = number
description = "The number of CPU units used by the task. If unspecified, it will default to `container_cpu`. If using `FARGATE` launch type `task_cpu` must match supported memory values (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)"
default = null
}
variable "task_memory" {
type = number
description = "The amount of memory (in MiB) used by the task. If unspecified, it will default to `container_memory`. If using Fargate launch type `task_memory` must match supported cpu value (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)"
default = null
}
variable "task_role_arn" {
type = string
description = "The ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services"
default = ""
}
variable "task_policy_arns" {
type = list(string)
description = "A list of IAM Policy ARNs to attach to the generated task role."
default = []
}
variable "ignore_changes_task_definition" {
type = bool
description = "Ignore changes (like environment variables) to the ECS task definition"
default = true
}
variable "ignore_changes_desired_count" {
type = bool
description = "Whether to ignore changes for desired count in the ECS service"
default = false
}
variable "system_controls" {
type = list(map(string))
description = "A list of namespaced kernel parameters to set in the container, mapping to the --sysctl option to docker run. This is a list of maps: { namespace = \"\", value = \"\"}"
default = null
}
variable "ulimits" {
type = list(object({
name = string
softLimit = number
hardLimit = number
}))
description = "The ulimits to configure for the container. This is a list of maps. Each map should contain \"name\", \"softLimit\" and \"hardLimit\""
default = []
}
variable "container_memory_reservation" {
type = number
description = "The amount of RAM (Soft Limit) to allow container to use in MB. This value must be less than `container_memory` if set"
default = 128
}
variable "container_port" {
type = number
description = "The port number on the container bound to assigned host_port"
default = 80
}
variable "nlb_container_port" {
type = number
description = "The port number on the container bound to assigned NLB host_port"
default = 80
}
variable "port_mappings" {
type = list(object({
containerPort = number
hostPort = number
protocol = string
}))
description = "The port mappings to configure for the container. This is a list of maps. Each map should contain \"containerPort\", \"hostPort\", and \"protocol\", where \"protocol\" is one of \"tcp\" or \"udp\". If using containers in a task with the awsvpc or host network mode, the hostPort can either be left blank or set to the same value as the containerPort"
default = [
{
containerPort = 80
hostPort = 80
protocol = "tcp"
}
]
}
variable "desired_count" {
type = number
description = "The desired number of tasks to start with. Set this to 0 if using DAEMON Service type. (FARGATE does not suppoert DAEMON Service type)"
default = 1
}
variable "launch_type" {
type = string
description = "The ECS launch type (valid options: FARGATE or EC2)"
default = "FARGATE"
}
variable "enable_all_egress_rule" {
type = bool
description = "A flag to enable/disable adding the all ports egress rule to the ECS security group"
default = true
}
variable "platform_version" {
type = string
description = "The platform version on which to run your service. Only applicable for launch_type set to FARGATE. More information about Fargate platform versions can be found in the AWS ECS User Guide."
default = "LATEST"
}
variable "capacity_provider_strategies" {
type = list(object({
capacity_provider = string
weight = number
base = number
}))
description = "The capacity provider strategies to use for the service. See `capacity_provider_strategy` configuration block: https://www.terraform.io/docs/providers/aws/r/ecs_service.html#capacity_provider_strategy"
default = []
}
variable "service_registries" {
type = list(object({
registry_arn = string
port = number
container_name = string
container_port = number
}))
description = "The service discovery registries for the service. The maximum number of service_registries blocks is 1. The currently supported service registry is Amazon Route 53 Auto Naming Service - `aws_service_discovery_service`; see `service_registries` docs https://www.terraform.io/docs/providers/aws/r/ecs_service.html#service_registries-1"
default = []
}
variable "volumes" {
type = list(object({
host_path = string
name = string
docker_volume_configuration = list(object({
autoprovision = bool
driver = string
driver_opts = map(string)
labels = map(string)
scope = string
}))
efs_volume_configuration = list(object({
file_system_id = string
root_directory = string
transit_encryption = string
transit_encryption_port = string
authorization_config = list(object({
access_point_id = string
iam = string
}))
}))
}))
description = "Task volume definitions as list of configuration objects"
default = []
}
variable "mount_points" {
type = list(object({
containerPath = string
sourceVolume = string
readOnly = bool
}))
description = "Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume`"
default = []
}
variable "container_environment" {
type = list(object({
name = string
value = string
}))
description = "The environment variables to pass to the container. This is a list of maps"
default = null
}
variable "map_container_environment" {
type = map(string)
description = "The environment variables to pass to the container. This is a map of string: {key: value}. `environment` overrides `map_environment`"
default = null
}
variable "entrypoint" {
type = list(string)
description = "The entry point that is passed to the container"
default = null
}
variable "command" {
type = list(string)
description = "The command that is passed to the container"
default = null
}
variable "secrets" {
type = list(object({
name = string
valueFrom = string
}))
description = "The secrets to pass to the container. This is a list of maps"
default = null
}
variable "privileged" {
type = string
description = "When this variable is `true`, the container is given elevated privileges on the host container instance (similar to the root user). This parameter is not supported for Windows containers or tasks using the Fargate launch type. Due to how Terraform type casts booleans in json it is required to double quote this value"
default = null
}
# https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html
variable "healthcheck" {
type = object({
command = list(string)
retries = number
timeout = number
interval = number
startPeriod = number
})
description = "A map containing command (string), timeout, interval (duration in seconds), retries (1-10, number of times to retry before marking container unhealthy), and startPeriod (0-300, optional grace period to wait, in seconds, before failed healthchecks count toward retries)"
default = null
}
variable "health_check_grace_period_seconds" {
type = number
description = "Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers"
default = 0
}
variable "alb_target_group_alarms_enabled" {
type = bool
description = "A boolean to enable/disable CloudWatch Alarms for ALB Target metrics"
default = false
}
variable "alb_target_group_alarms_3xx_threshold" {
type = number
description = "The maximum number of 3XX HTTPCodes in a given period for ECS Service"
default = 25
}
variable "alb_target_group_alarms_4xx_threshold" {
type = number
description = "The maximum number of 4XX HTTPCodes in a given period for ECS Service"
default = 25
}
variable "alb_target_group_alarms_5xx_threshold" {
type = number
description = "The maximum number of 5XX HTTPCodes in a given period for ECS Service"
default = 25
}
variable "alb_target_group_alarms_response_time_threshold" {
type = number
description = "The maximum ALB Target Group response time"
default = 0.5
}
variable "alb_target_group_alarms_period" {
type = number
description = "The period (in seconds) to analyze for ALB CloudWatch Alarms"
default = 300
}
variable "alb_target_group_alarms_evaluation_periods" {
type = number
description = "The number of periods to analyze for ALB CloudWatch Alarms"
default = 1
}
variable "alb_target_group_alarms_alarm_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to execute when ALB Target Group alarms transition into an ALARM state from any other state"
default = []
}
variable "alb_target_group_alarms_ok_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to execute when ALB Target Group alarms transition into an OK state from any other state"
default = []
}
variable "alb_target_group_alarms_insufficient_data_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to execute when ALB Target Group alarms transition into an INSUFFICIENT_DATA state from any other state"
default = []
}
variable "alb_arn_suffix" {
type = string
description = "ARN suffix of the ALB for the Target Group"
default = ""
}
variable "alb_security_group" {
type = string
description = "Security group of the ALB"
}
variable "use_alb_security_group" {
type = bool
description = "A boolean to enable adding an ALB security group rule for the service task"
default = false
}
variable "use_nlb_cidr_blocks" {
type = bool
description = "A flag to enable/disable adding the NLB ingress rule to the security group"
default = false
}
variable "nlb_cidr_blocks" {
type = list(string)
description = "A list of CIDR blocks to add to the ingress rule for the NLB container port"
default = []
}
variable "alb_ingress_enable_default_target_group" {
type = bool
description = "If true, create a default target group for the ALB ingress"
default = true
}
variable "alb_ingress_target_group_arn" {
type = string
description = "Existing ALB target group ARN. If provided, set `alb_ingress_enable_default_target_group` to `false` to disable creation of the default target group"
default = ""
}
variable "alb_ingress_healthcheck_path" {
type = string
description = "The path of the healthcheck which the ALB checks"
default = "/"
}
variable "alb_ingress_healthcheck_protocol" {
type = string
default = "HTTP"
description = "The protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `target_type` is `lambda`"
}
variable "alb_ingress_health_check_healthy_threshold" {
type = number
default = 2
description = "The number of consecutive health checks successes required before healthy"
}
variable "alb_ingress_health_check_unhealthy_threshold" {
type = number
default = 2
description = "The number of consecutive health check failures required before unhealthy"
}
variable "alb_ingress_health_check_interval" {
type = number
default = 15
description = "The duration in seconds in between health checks"
}
variable "alb_ingress_health_check_timeout" {
type = number
default = 10
description = "The amount of time to wait in seconds before failing a health check request"
}
variable "alb_ingress_listener_unauthenticated_priority" {
type = number
default = 1000
description = "The priority for the rules without authentication, between 1 and 50000 (1 being highest priority). Must be different from `alb_ingress_listener_authenticated_priority` since a listener can't have multiple rules with the same priority"
}
variable "alb_ingress_listener_authenticated_priority" {
type = number
default = 300
description = "The priority for the rules with authentication, between 1 and 50000 (1 being highest priority). Must be different from `alb_ingress_listener_unauthenticated_priority` since a listener can't have multiple rules with the same priority"
}
variable "alb_ingress_unauthenticated_hosts" {
type = list(string)
default = []
description = "Unauthenticated hosts to match in Hosts header"
}
variable "alb_ingress_authenticated_hosts" {
type = list(string)
default = []
description = "Authenticated hosts to match in Hosts header"
}
variable "alb_ingress_unauthenticated_paths" {
type = list(string)
default = []
description = "Unauthenticated path pattern to match (a maximum of 1 can be defined)"
}
variable "alb_ingress_authenticated_paths" {
type = list(string)
default = []
description = "Authenticated path pattern to match (a maximum of 1 can be defined)"
}
variable "nlb_ingress_target_group_arn" {
type = string
description = "Target group ARN of the NLB ingress"
default = ""
}
variable "alb_stickiness_type" {
type = string
default = "lb_cookie"
description = "The type of sticky sessions. The only current possible value is `lb_cookie`"
}
variable "alb_stickiness_cookie_duration" {
type = number
default = 86400
description = "The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds)"
}
variable "alb_stickiness_enabled" {
type = bool
default = true
description = "Boolean to enable / disable `stickiness`. Default is `true`"
}
variable "vpc_id" {
type = string
description = "The VPC ID where resources are created"
}
variable "aws_logs_region" {
type = string
description = "The region for the AWS Cloudwatch Logs group"
default = null
}
variable "aws_logs_prefix" {
type = string
description = "Custom AWS Logs prefix. If empty name from label module will be used"
default = ""
}
variable "log_retention_in_days" {
type = number
description = "The number of days to retain logs for the log group"
default = 90
}
variable "log_driver" {
type = string
description = "The log driver to use for the container. If using Fargate launch type, only supported value is awslogs"
default = "awslogs"
}
variable "assign_public_ip" {
type = bool
description = "Assign a public IP address to the ENI (Fargate launch type only). Valid values are `true` or `false`. Default `false`"
default = false
}
variable "ecs_alarms_enabled" {
type = bool
description = "A boolean to enable/disable CloudWatch Alarms for ECS Service metrics"
default = false
}
variable "ecs_cluster_arn" {
type = string
description = "The ECS Cluster ARN where ECS Service will be provisioned"
}
variable "ecs_cluster_name" {
type = string
description = "The ECS Cluster Name to use in ECS Code Pipeline Deployment step"
default = null
}
variable "ecs_alarms_cpu_utilization_high_threshold" {
type = number
description = "The maximum percentage of CPU utilization average"
default = 80
}
variable "ecs_alarms_cpu_utilization_high_evaluation_periods" {
type = number
description = "Number of periods to evaluate for the alarm"
default = 1
}
variable "ecs_alarms_cpu_utilization_high_period" {
type = number
description = "Duration in seconds to evaluate for the alarm"
default = 300
}
variable "ecs_alarms_cpu_utilization_high_alarm_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization High Alarm action"
default = []
}
variable "ecs_alarms_cpu_utilization_high_ok_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization High OK action"
default = []
}
variable "ecs_alarms_cpu_utilization_low_threshold" {
type = number
description = "The minimum percentage of CPU utilization average"
default = 20
}
variable "ecs_alarms_cpu_utilization_low_evaluation_periods" {
type = number
description = "Number of periods to evaluate for the alarm"
default = 1
}
variable "ecs_alarms_cpu_utilization_low_period" {
type = number
description = "Duration in seconds to evaluate for the alarm"
default = 300
}
variable "ecs_alarms_cpu_utilization_low_alarm_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization Low Alarm action"
default = []
}
variable "ecs_alarms_cpu_utilization_low_ok_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization Low OK action"
default = []
}
variable "ecs_alarms_memory_utilization_high_threshold" {
type = number
description = "The maximum percentage of Memory utilization average"
default = 80
}
variable "ecs_alarms_memory_utilization_high_evaluation_periods" {
type = number
description = "Number of periods to evaluate for the alarm"
default = 1
}
variable "ecs_alarms_memory_utilization_high_period" {
type = number
description = "Duration in seconds to evaluate for the alarm"
default = 300
}
variable "ecs_alarms_memory_utilization_high_alarm_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on Memory Utilization High Alarm action"
default = []
}
variable "ecs_alarms_memory_utilization_high_ok_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on Memory Utilization High OK action"
default = []
}
variable "ecs_alarms_memory_utilization_low_threshold" {
type = number
description = "The minimum percentage of Memory utilization average"
default = 20
}
variable "ecs_alarms_memory_utilization_low_evaluation_periods" {
type = number
description = "Number of periods to evaluate for the alarm"
default = 1
}
variable "ecs_alarms_memory_utilization_low_period" {
type = number
description = "Duration in seconds to evaluate for the alarm"
default = 300
}
variable "ecs_alarms_memory_utilization_low_alarm_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on Memory Utilization Low Alarm action"
default = []
}
variable "ecs_alarms_memory_utilization_low_ok_actions" {
type = list(string)
description = "A list of ARNs (i.e. SNS Topic ARN) to notify on Memory Utilization Low OK action"
default = []
}
variable "ecs_security_group_ids" {
type = list(string)
description = "Additional Security Group IDs to allow into ECS Service if `var.network_mode = \"awsvpc\"`"
default = []
}
variable "ecs_private_subnet_ids" {
type = list(string)
description = "List of Private Subnet IDs to provision ECS Service onto if `var.network_mode = \"awsvpc\"`"
}
variable "github_oauth_token" {
type = string
description = "GitHub Oauth Token with permissions to access private repositories"
default = ""
}
variable "github_webhooks_token" {
type = string
description = "GitHub OAuth Token with permissions to create webhooks. If not provided, can be sourced from the `GITHUB_TOKEN` environment variable"
default = ""
}
variable "github_webhook_events" {
type = list(string)
description = "A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)"
default = ["push"]
}
variable "repo_owner" {
type = string
description = "GitHub Organization or Username"
default = ""
}
variable "repo_name" {
type = string
description = "GitHub repository name of the application to be built and deployed to ECS"
default = ""
}
variable "branch" {
type = string
description = "Branch of the GitHub repository, e.g. `master`"
default = ""
}
variable "badge_enabled" {
type = bool
default = false
description = "Generates a publicly-accessible URL for the projects build badge. Available as badge_url attribute when enabled"
}
variable "build_image" {
type = string
default = "aws/codebuild/docker:17.09.0"
description = "Docker image for build environment, _e.g._ `aws/codebuild/docker:docker:17.09.0`"
}
variable "build_environment_variables" {
type = list(object(
{
name = string
value = string
type = string
}))
default = []
description = "A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER_STORE', or 'SECRETS_MANAGER'"
}
variable "build_timeout" {
type = number
default = 60
description = "How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed"
}
variable "buildspec" {
type = string
description = "Declaration to use for building the project. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html)"
default = ""
}
variable "autoscaling_enabled" {
type = bool
description = "A boolean to enable/disable Autoscaling policy for ECS Service"
default = false
}
variable "autoscaling_dimension" {
type = string
description = "Dimension to autoscale on (valid options: cpu, memory)"
default = "memory"
}
variable "autoscaling_min_capacity" {
type = number
description = "Minimum number of running instances of a Service"
default = 1
}
variable "autoscaling_max_capacity" {
type = number
description = "Maximum number of running instances of a Service"
default = 2
}
variable "autoscaling_scale_up_adjustment" {
type = number
description = "Scaling adjustment to make during scale up event"
default = 1
}
variable "autoscaling_scale_up_cooldown" {
type = number
description = "Period (in seconds) to wait between scale up events"
default = 60
}
variable "autoscaling_scale_down_adjustment" {
type = number
description = "Scaling adjustment to make during scale down event"
default = -1
}
variable "autoscaling_scale_down_cooldown" {
type = number
description = "Period (in seconds) to wait between scale down events"
default = 300
}
variable "poll_source_changes" {
type = bool
default = false
description = "Periodically check the location of your source content and run the pipeline if changes are detected"
}
variable "webhook_enabled" {
type = bool
description = "Set to false to prevent the module from creating any webhook resources"
default = true
}
variable "webhook_target_action" {
type = string
description = "The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline"
default = "Source"
}
variable "webhook_authentication" {
type = string
description = "The type of authentication to use. One of IP, GITHUB_HMAC, or UNAUTHENTICATED"
default = "GITHUB_HMAC"
}
variable "webhook_filter_json_path" {
type = string
description = "The JSON path to filter on"
default = "$.ref"
}
variable "webhook_filter_match_equals" {
type = string
description = "The value to match on (e.g. refs/heads/{Branch})"
default = "refs/heads/{Branch}"
}
variable "alb_ingress_unauthenticated_listener_arns" {
type = list(string)
description = "A list of unauthenticated ALB listener ARNs to attach ALB listener rules to"
default = []
}
variable "alb_ingress_unauthenticated_listener_arns_count" {
type = number
description = "The number of unauthenticated ARNs in `alb_ingress_unauthenticated_listener_arns`. This is necessary to work around a limitation in Terraform where counts cannot be computed"
default = 0
}
variable "alb_ingress_authenticated_listener_arns" {
type = list(string)
description = "A list of authenticated ALB listener ARNs to attach ALB listener rules to"
default = []
}
variable "alb_ingress_authenticated_listener_arns_count" {
type = number
description = "The number of authenticated ARNs in `alb_ingress_authenticated_listener_arns`. This is necessary to work around a limitation in Terraform where counts cannot be computed"
default = 0
}
variable "authentication_type" {
type = string
description = "Authentication type. Supported values are `COGNITO` and `OIDC`"
default = ""
}
variable "authentication_cognito_user_pool_arn" {
type = string
description = "Cognito User Pool ARN"
default = ""
}
variable "authentication_cognito_user_pool_client_id" {
type = string
description = "Cognito User Pool Client ID"
default = ""
}
variable "authentication_cognito_user_pool_domain" {
type = string
description = "Cognito User Pool Domain. The User Pool Domain should be set to the domain prefix (`xxx`) instead of full domain (https://xxx.auth.us-west-2.amazoncognito.com)"
default = ""
}
variable "authentication_cognito_scope" {
type = string
description = "Cognito scope, which should be a space separated string of requested scopes (see https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims)"
default = null
}
variable "authentication_oidc_client_id" {
type = string
description = "OIDC Client ID"
default = ""
}
variable "authentication_oidc_client_secret" {
type = string
description = "OIDC Client Secret"
default = ""
}
variable "authentication_oidc_issuer" {
type = string
description = "OIDC Issuer"
default = ""
}
variable "authentication_oidc_authorization_endpoint" {
type = string
description = "OIDC Authorization Endpoint"
default = ""
}
variable "authentication_oidc_token_endpoint" {
type = string
description = "OIDC Token Endpoint"
default = ""
}
variable "authentication_oidc_user_info_endpoint" {
type = string
description = "OIDC User Info Endpoint"
default = ""
}
variable "authentication_oidc_scope" {
type = string
description = "OIDC scope, which should be a space separated string of requested scopes (see https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims, and https://developers.google.com/identity/protocols/oauth2/openid-connect#scope-param for an example set of scopes when using Google as the IdP)"
default = null
}
variable "codepipeline_build_cache_bucket_suffix_enabled" {
type = bool
description = "The codebuild cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value. It only works when cache_type is 'S3'"
default = true
}
variable "codepipeline_build_compute_type" {
type = string
default = "BUILD_GENERAL1_SMALL"
description = "`CodeBuild` instance size. Possible values are: `BUILD_GENERAL1_SMALL` `BUILD_GENERAL1_MEDIUM` `BUILD_GENERAL1_LARGE`"
}
variable "codepipeline_s3_bucket_force_destroy" {
type = bool
description = "A boolean that indicates all objects should be deleted from the CodePipeline artifact store S3 bucket so that the bucket can be destroyed without error"
default = false
}
variable "init_containers" {
type = list(object({
container_definition = any
condition = string
}))
description = "A list of additional init containers to start. The map contains the container_definition (JSON) and the main container's dependency condition (string) on the init container. The latter can be one of START, COMPLETE, SUCCESS or HEALTHY."
default = []
}
variable "container_definition" {
type = string
description = "Override the main container_definition"
default = ""
}
variable "cloudwatch_log_group_enabled" {
type = bool
description = "A boolean to disable cloudwatch log group creation"
default = true
}
variable "alb_container_name" {
type = string
description = "The name of the container to associate with the ALB. If not provided, the generated container will be used"
default = null
}
variable "nlb_container_name" {
type = string
description = "The name of the container to associate with the NLB. If not provided, the generated container will be used"
default = null
}