-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecs-cluster-infrastructure-logspout-service.tf
More file actions
48 lines (44 loc) · 1.67 KB
/
ecs-cluster-infrastructure-logspout-service.tf
File metadata and controls
48 lines (44 loc) · 1.67 KB
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
resource "aws_ecs_task_definition" "infrastructure_ecs_cluster_logspout" {
count = local.infrastructure_ecs_cluster_logspout_enabled ? 1 : 0
family = "${local.resource_prefix}-ecs-infrastructure-logsput"
container_definitions = templatefile(
"./container-definitions/app.json.tpl",
{
container_name = "logspout"
image = aws_ecr_repository.infrastructure_ecs_cluster_logspout[0].repository_url
entrypoint = jsonencode([])
command = jsonencode([local.infrastructure_ecs_cluster_logspout_command])
environment_file_s3 = ""
environment = jsonencode([])
secrets = jsonencode([])
container_port = 0
extra_hosts = jsonencode([])
volumes = jsonencode([
{
sourceVolume = "dockersock"
containerPath = "/var/run/docker.sock"
}
])
linux_parameters = jsonencode({})
security_options = jsonencode([])
syslog_address = ""
syslog_tag = ""
cloudwatch_log_group = ""
awslogs_stream_prefix = ""
region = local.aws_region
}
)
volume {
name = "dockersock"
host_path = "/var/run/docker.sock"
}
network_mode = "bridge"
requires_compatibilities = ["EC2"]
}
resource "aws_ecs_service" "infrastructure_ecs_cluster_logspout" {
count = local.infrastructure_ecs_cluster_logspout_enabled ? 1 : 0
name = "logsput"
cluster = aws_ecs_cluster.infrastructure[0].name
task_definition = aws_ecs_task_definition.infrastructure_ecs_cluster_logspout[0].arn
scheduling_strategy = "DAEMON"
}