forked from FitnessKeeper/terraform-aws-ecs-service
-
Notifications
You must be signed in to change notification settings - Fork 8
/
variables.tf
332 lines (271 loc) · 8.95 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
//
// Variables specific to module label
//
variable "attributes" {
description = "Suffix name with additional attributes (policy, role, etc.)"
type = "list"
default = []
}
variable "delimiter" {
description = "Delimiter to be used between `name`, `namespaces`, `attributes`, etc."
default = "-"
}
variable "environment" {
description = "Environment (ex: `dev`, `qa`, `stage`, `prod`). (Second or top level namespace. Depending on namespacing options)"
}
variable "name" {
description = "Base name for resources"
}
variable "namespace-env" {
description = "Prefix name with the environment. If true, format is: <env>-<name>"
default = true
}
variable "namespace-org" {
description = "Prefix name with the organization. If true, format is: <org>-<env namespaced name>. If both env and org namespaces are used, format will be <org>-<env>-<name>"
default = false
}
variable "organization" {
description = "Organization name (Top level namespace)."
default = ""
}
variable "tags" {
description = "A map of additional tags"
type = "map"
default = {}
}
//
// Variables specific to DNS Aliases module
//
variable "dns_aliases" {
description = "Additional DNS names"
type = "list"
default = []
}
variable "dns_parent_zone_name" {
description = "DNS name of the parent zone to put this in"
default = ""
}
//
// 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_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_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"
}
// Variables specific to Security Group module
//
// Variables for container definition template
//
//
// Variables specific to this module
//
variable "enabled" {
description = "Set to false to prevent the module from creating anything"
default = true
}
variable "enable_lb" {
description = "Set to false to prevent the module from creating a Load Balancer"
default = true
}
variable "region" {
description = "AWS region in which ECS cluster is located (default is 'us-east-1')"
type = "string"
default = "us-east-1"
}
variable "vpc_id" {
description = "ID of VPC in which ECS cluster is located"
type = "string"
}
variable "ecs_cluster_arn" {
description = "ARN of ECS cluster in which the service will be deployed"
type = "string"
}
variable "ecs_security_group_id" {
description = "Security group ID of ECS cluster in which the service will be deployed"
type = "string"
}
variable "ecs_desired_count" {
description = "Desired number of containers in the task (default 1)"
type = "string"
default = 1
}
variable "docker_command" {
description = "String to override CMD in Docker container (default \"\")"
default = ""
}
variable "docker_environment" {
description = "List of environment maps of format { \"name\" = \"var_name\", \"value\" = \"var_value\" }"
type = "list"
default = []
}
variable "docker_image" {
description = "Docker image to use for task"
type = "string"
default = ""
}
variable "docker_memory" {
description = "Hard limit on memory use for task container (default 256)"
default = 256
}
variable "docker_memory_reservation" {
description = "Soft limit on memory use for task container (default 128)"
default = 128
}
variable "docker_port_mappings" {
description = "List of port mapping maps of format { \"containerPort\" = integer, [ \"hostPort\" = integer, \"protocol\" = \"tcp or udp\" ] }"
type = "list"
default = []
}
variable "docker_mount_points" {
description = "List of mount point maps of format { \"sourceVolume\" = \"vol_name\", \"containerPath\" = \"path\", [\"readOnly\" = \"true or false\" ] }"
type = "list"
default = []
}
variable "docker_registry" {
description = "Docker register for image"
default = ""
}
variable "docker_volumes" {
description = "List of volume maps of format { \"name\" = \"var_name\", \"host_path\" = \"var_value\" }"
type = "list"
default = []
}
variable "ecs_data_volume_path" {
description = "Path to volume on ECS node to be defined as a \"data\" volume (default \"/opt/data\")"
default = "/opt/data"
}
variable "network_mode" {
description = "Docker network mode for task (default \"bridge\")"
default = "bridge"
}
variable "service_identifier" {
description = "Unique identifier for this pganalyze service (used in log prefix, service name etc.)"
default = "service"
}
variable "task_identifier" {
description = "Unique identifier for this pganalyze task (used in log prefix, service name etc.)"
default = "task"
}
variable "log_group_name" {
description = "Name for CloudWatch Log Group that will receive collector logs (must be unique, default is created from service_identifier and task_identifier)"
type = "string"
default = ""
}
variable "extra_task_policy_arns" {
description = "List of ARNs of IAM policies to be attached to the ECS task role (in addition to the default policy, so cannot be more than 9 ARNs)"
type = "list"
default = []
}
variable "app_port" {
description = "Numeric port on which application listens (unnecessary if neither lb_enable_https or lb_enable_http are true)"
type = "string"
default = ""
}
variable "ecs_deployment_maximum_percent" {
description = "Upper limit in percentage of tasks that can be running during a deployment (default 200)"
default = "200"
}
variable "ecs_deployment_minimum_healthy_percent" {
description = "Lower limit in percentage of tasks that must remain healthy during a deployment (default 100)"
default = "100"
}
variable "ecs_placement_constraints" {
description = "Placement contraints to use when distributing tasks"
type = "list"
default = []
}
variable "ecs_placement_strategy_type" {
description = "Placement strategy to use when distributing tasks (default binpack)"
default = "binpack"
}
variable "ecs_placement_strategy_field" {
description = "Container metadata field to use when distributing tasks (default memory)"
default = "memory"
}
variable "ecs_log_retention" {
description = "Number of days of ECS task logs to retain (default 3)"
default = 3
}
variable "container_definition" {
description = "Container definition when not using module default definition"
default = ""
}
variable "container_definition_additional" {
description = "Additional parameters to add to container definition. This is a json substring"
default = ""
}