-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
47 lines (39 loc) · 1.26 KB
/
main.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
resource "aws_ecs_task_definition" "task_def" {
family = local.task_family
task_role_arn = aws_iam_role.task_role.arn
execution_role_arn = aws_iam_role.task_execution_role.arn
container_definitions = local.container_definitions
cpu = var.cpu_reservation
memory = var.memory_reservation
requires_compatibilities = var.requires_compatibilities
network_mode = var.network_mode
dynamic "proxy_configuration" {
for_each = toset(local.use_envoy_sidecar ? [local.use_envoy_sidecar] : [])
content {
type = "APPMESH"
container_name = "envoy"
properties = {
AppPorts = var.container_port
EgressIgnoredIPs = "169.254.170.2,169.254.169.254"
IgnoredUID = "1337"
ProxyEgressPort = 15001
ProxyIngressPort = 15000
}
}
}
dynamic "volume" {
for_each = var.efs_mounts
content {
name = volume.value["file_system_id"]
efs_volume_configuration {
file_system_id = volume.value["file_system_id"]
root_directory = "/"
}
}
}
runtime_platform {
operating_system_family = var.runtime_platform["operating_system_family"]
cpu_architecture = var.runtime_platform["cpu_architecture"]
}
tags = local.tags
}