Skip to content

Commit

Permalink
Merge pull request #26 from telia-oss/add-stop-timeout
Browse files Browse the repository at this point in the history
Added support for stop timeout
  • Loading branch information
larstobi authored Dec 12, 2019
2 parents 835f8e6 + 35e16b6 commit 6c54d6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ resource "aws_ecs_task_definition" "task" {
"awslogs-stream-prefix": "container"
}
},
"stopTimeout": ${var.stop_timeout},
"command": ${jsonencode(var.task_container_command)},
"environment": ${jsonencode(local.task_environment)}
}]
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,8 @@ variable "service_registry_arn" {
description = "ARN of aws_service_discovery_service resource"
type = string
}

variable "stop_timeout" {
description = "Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. On Fargate the maximum value is 120 seconds."
default = 30
}

0 comments on commit 6c54d6b

Please sign in to comment.