Skip to content

Commit

Permalink
added start-stop timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
vavdoshka committed May 8, 2021
1 parent f73832c commit 051a0ea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ data "template_file" "container_definition" {
repositoryCredentials = local.repositoryCredentials == "{}" ? "null" : local.repositoryCredentials
resourceRequirements = local.resourceRequirements == "[]" ? "null" : local.resourceRequirements
secrets = local.secrets == "[]" ? "null" : local.secrets
startTimeout = var.startTimeout
stopTimeout = var.stopTimeout
systemControls = local.systemControls == "[]" ? "null" : local.systemControls
ulimits = local.ulimits == "[]" ? "null" : local.ulimits
user = var.user == "" ? "null" : var.user
Expand Down
4 changes: 3 additions & 1 deletion templates/container-definition.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@
"ulimits": ${ulimits},
"user": "${user}",
"volumesFrom": ${volumesFrom},
"workingDirectory": "${workingDirectory}"
"workingDirectory": "${workingDirectory}",
"startTimeout": ${startTimeout},
"stopTimeout": ${stopTimeout}
}
11 changes: 11 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,17 @@ variable "secrets" {
type = list(map(string))
}

variable "startTimeout" {
default = 120
description = "Time duration (in seconds) to wait before giving up on resolving dependencies for a container."
}

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


variable "systemControls" {
default = []
description = "A list of namespaced kernel parameters to set in the container"
Expand Down

0 comments on commit 051a0ea

Please sign in to comment.