forked from devops-workflow/terraform-aws-ecs-service
-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables-lb.tf
147 lines (120 loc) · 3.86 KB
/
variables-lb.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
//
// Variables specific to LB module
//
variable "lb_enable_https" {
description = "Enable HTTPS listener in LB (http or https MUST be enabled)"
default = "false"
}
variable "lb_enable_http" {
description = "Enable HTTP listener in LB (http or https MUST be enabled)"
default = true
}
variable "lb_internal" {
description = "Configure LB as internal-only"
default = true
}
variable "lb_subnet_ids" {
description = "VPC subnet IDs in which to create the LB (unnecessary if neither lb_enable_https or lb_enable_http are true)"
type = "list"
default = []
}
variable "acm_cert_domain" {
description = "Domain name of ACM-managed certificate"
type = "string"
default = ""
}
variable "lb_healthcheck_interval" {
description = "Time in seconds between LB health checks (default 30)"
default = 30
}
variable "lb_idle_timeout" {
description = "The time in seconds that the connection is allowed to be idle"
default = "60"
}
variable "lb_healthcheck_path" {
description = "URI path for LB health checks (default /)"
default = "/"
}
variable "lb_healthcheck_port" {
description = "Port for LB to use when connecting health checks (default same as application traffic)"
default = "traffic-port"
}
variable "lb_healthcheck_protocol" {
description = "Protocol for LB to use when connecting health checks (default HTTP)"
default = "HTTP"
}
variable "lb_healthcheck_timeout" {
description = "Timeout in seconds for LB to use when connecting health checks (default 5)"
default = 5
}
variable "lb_healthcheck_healthy_threshold" {
description = "Number of consecutive successful health checks before marking service as healthy (default 5)"
default = 5
}
variable "lb_healthcheck_unhealthy_threshold" {
description = "Number of consecutive failed health checks before marking service as unhealthy (default 2)"
default = 5
}
variable "lb_healthcheck_matcher" {
description = "HTTP response codes to accept as healthy (default 200)"
default = "200-399"
}
variable "lb_cookie_duration" {
description = "Duration of LB session stickiness cookie in seconds (default 86400)"
default = "86400"
}
variable "lb_https_ports" {
description = "HTTPS ports load balancer should listen on"
default = "443"
}
variable "lb_ingress_cidr_blocks" {
description = "List of ingress CIDR blocks for load balancer"
type = "list"
default = ["10.0.0.0/8"]
}
variable "lb_listener_arn" {
description = "Add to existing LB listener"
default = ""
}
variable "lb_listener_rule_pattern" {
description = "Add to existing LB listener with rule pattern"
default = ""
}
variable "lb_listener_rule_priority" {
description = "Add to existing LB listener as rule priority"
default = ""
}
variable "lb_ports" {
description = "Ports load balancer should listen on"
default = "80"
}
variable "lb_stickiness_enabled" {
description = "Enable LB session stickiness (default false)"
default = "false"
}
variable "lb_type" {
description = "Type of LB to create: application, network"
default = "application"
}
variable "lb_enable_logging" {
type = "string"
description = "Enable the LB to write log entries to S3."
default = "false"
}
variable "lb_log_bucket_name" {
description = "S3 bucket for storing LB access logs. To create the bucket \"create_log_bucket\" should be set to true."
default = ""
}
variable "lb_log_location_prefix" {
description = "S3 prefix within the log_bucket_name under which logs are stored."
default = ""
}
# Remove?
variable "target_group_only" {
description = "Only create target group without a load balancer. For when more advanced LB setups are required"
default = false
}
variable "target_type" {
description = "Type for targets for target group. Can be: instance or ip"
default = "instance"
}