forked from devops-workflow/terraform-aws-ecs-service
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
467 lines (384 loc) · 12.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
//
// Variables specific to DNS Aliases module
//
variable "dns_aliases" {
description = "Additional DNS names"
type = "list"
default = []
}
variable "dns_full_name" {
description = "Use full name (id from label module) instead of short name for DNS host"
default = false
}
variable "dns_parent_zone_name" {
description = "DNS name of the parent zone to put this in"
default = ""
}
// 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_ecs_managed_tags" {
description = "Enable ECS managed task tagging"
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 "ecslogs_bucket" {
description = "s3 bucket to store ecs service logs"
type = "string"
default = ""
}
variable "total_file_size" {
type = "string"
default = "1M"
}
variable "use_put_object" {
type = "string"
default = ""
}
variable "upload_timeout" {
type = "string"
default = ""
}
variable "retry_limit" {
type = "string"
default = ""
}
variable "awslogs_stream_prefix" {
type = "string"
default = "firelens"
}
variable "vpc_id" {
description = "ID of VPC in which ECS cluster is located"
type = "string"
}
variable "assign_public_ip" {
description = "Assign a public IP address to the ENI (Fargate launch type only)"
default = false
}
variable "awsvpc_security_group_ids" {
description = "Security ID's to assign to awsvpc network mode tasks"
type = "list"
default = []
}
variable "awsvpc_subnet_ids" {
description = "Subnet IDs to put awsvpc network tasks in"
type = "list"
default = []
}
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 "ecs_launch_type" {
description = "The launch type on which to run your service. The valid values are EC2 and FARGATE"
default = "FARGATE"
}
variable "capacity_provider_1_type" {
description = "ECS service capacity provider 1"
default = "FARGATE_SPOT"
}
variable "capacity_provider_1_base" {
description = "The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined"
default = "0"
}
variable "capacity_provider_1_weight" {
description = "The relative percentage of the total number of launched tasks that should use the specified capacity provider"
default = "10"
}
variable "capacity_provider_2_type" {
description = "ECS service capacity provider 2"
default = "FARGATE"
}
variable "capacity_provider_2_base" {
description = "The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined"
default = "0"
}
variable "capacity_provider_2_weight" {
description = "The relative percentage of the total number of launched tasks that should use the specified capacity provider"
default = "0"
}
variable "docker_command" {
description = "String to override CMD in Docker container (default \"\")"
default = ""
}
variable "docker_cpu" {
description = "CPU units for task"
default = "512"
}
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 = [{ name = "logvolume" }]
}
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 "platform_version" {
description = "The platform version on which to run your service. Only applicable for launch_type set to FARGATE"
default = ""
}
variable "propagate_tags_method" {
description = "Propagate tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION"
default = "SERVICE"
}
variable "requires_compatibilities" {
description = "A set of launch types required by the task. The valid values are EC2 and FARGATE"
type = "list"
default = []
}
variable "security_group_ids" {
description = "The security groups associated with the task or service"
type = "list"
default = []
}
variable "service" {
description = "label service name"
default = ""
}
variable "service_full_name" {
description = "Use full name (id from label module) instead of short name for service name"
default = false
}
variable "service_identifier" {
description = "Unique identifier for this pganalyze service (used in log prefix, service name etc.)"
default = "service"
}
variable "subnet_ids" {
description = "The subnets associated with the task or service. For awsvpc"
type = "list"
default = []
}
variable "task_definition_arn" {
description = "Task definition ARN to use instead of module generated one"
default = ""
}
variable "task_execution_role_arn" {
description = "Execution role arn for tasks. Required got Fargate"
default = ""
}
variable "task_identifier" {
description = "Unique identifier for this pganalyze task (used in log prefix, service name etc.)"
default = "task"
}
variable "task_role_arn" {
description = "Task role ARN to use instead of module generated one"
default = ""
}
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_health_check_grace_period_seconds" {
description = "Health check grace period (seconds) before LB health checks start"
default = "30"
}
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 = ""
}
variable "firelens_port" {
description = "Port of firelens application (default 24224)"
default = "24224"
}
variable "firelens_host_url" {
description = "URL of firelens application"
default = ""
}
variable "sidecar_container_definition_additional" {
description = "Sidecar Additional parameters to add to container definition. This is a json substring"
default = ""
}
variable "sidecar_docker_image" {
description = "Sidecar Docker image to use for task"
type = "string"
default = ""
}
variable "sidecar_docker_environment" {
description = "Sidecar List of environment maps of format { \"name\" = \"var_name\", \"value\" = \"var_value\" }"
type = "list"
default = []
}
variable "sidecar_docker_memory_reservation" {
description = "Sidecar Soft limit on memory use for task container (default 128)"
default = 128
}
variable "telegraf_sidecar_container_definition_additional" {
description = "Sidecar Additional parameters to add to container definition. This is a json substring"
default = ""
}
variable "telegraf_sidecar_docker_image" {
description = "Sidecar Docker image to use for task"
type = "string"
default = ""
}
variable "telegraf_sidecar_docker_environment" {
description = "Sidecar List of environment maps of format { \"name\" = \"var_name\", \"value\" = \"var_value\" }"
type = "list"
default = []
}
variable "telegraf_sidecar_docker_memory_reservation" {
description = "Sidecar Soft limit on memory use for task container (default 128)"
default = 128
}
variable "enable_telegraf" {
description = "Enable/disable telegraf"
default = "false"
}
variable "promtail_sidecar_container_definition_additional" {
description = "Sidecar Additional parameters to add to container definition. This is a json substring"
default = ""
}
variable "promtail_sidecar_docker_image" {
description = "Sidecar Docker image to use for task"
type = "string"
default = ""
}
variable "promtail_sidecar_docker_environment" {
description = "Sidecar List of environment maps of format { \"name\" = \"var_name\", \"value\" = \"var_value\" }"
type = "list"
default = []
}
variable "promtail_sidecar_docker_memory_reservation" {
description = "Sidecar Soft limit on memory use for task container (default 128)"
default = 256
}
variable "container_path" {
description = "Port of firelens application (default 24224)"
default = "/tmp/"
}
variable "source_volume_name" {
description = "URL of firelens application"
default = "logvolume"
}
variable "cleanup_sidecar_container_definition_additional" {
description = "Sidecar Additional parameters to add to container definition. This is a json substring"
default = ""
}
variable "cleanup_sidecar_docker_image" {
description = "Sidecar Docker image to use for task"
type = "string"
default = ""
}
variable "cleanup_sidecar_docker_environment" {
description = "Sidecar List of environment maps of format { \"name\" = \"var_name\", \"value\" = \"var_value\" }"
type = "list"
default = []
}
variable "cleanup_sidecar_docker_memory_reservation" {
description = "Sidecar Soft limit on memory use for task container (default 128)"
default = 128
}
variable "component" {
description = "label component name"
default = ""
}
variable "product" {
description = "label product name"
default = ""
}
variable "team" {
description = "label team name"
default = ""
}