Skip to content

Commit 8bf03b2

Browse files
author
Eugene Dementiev
committed
Use embedded tini init process by default
1 parent f5912b6 commit 8bf03b2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ resource "aws_ecs_task_definition" "task" {
1010
memoryReservation = var.memory_reservation
1111
mountPoints = []
1212
volumesFrom = []
13+
linuxParameters = {
14+
initProcessEnabled = var.init_process_enabled
15+
}
1316
}
1417
], var.additional_container_definitions) : merge(s, {
1518
environment = [for k in sort(keys(var.environment)) : { "name" : k, "value" : var.environment[k] }]

variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ variable "target_group_names" {
1616
default = []
1717
}
1818

19+
1920
variable "environment" {
2021
description = "Enviropnment vars to pass to the container. Note: they will be visible in the task definition, so please don't pass any secrets here."
2122
type = map
@@ -95,6 +96,12 @@ variable "desired_count" {
9596
default = 1
9697
}
9798

99+
variable "init_process_enabled" {
100+
description = "Use embdedded to Docker tini init process that correctly reaps zombie processes"
101+
default = true
102+
}
103+
104+
98105
locals {
99106
balanced = var.container_port > 0
100107
load_balancer_container_name = coalesce(var.load_balancer_container_name, var.service_name)

0 commit comments

Comments
 (0)