Skip to content

Commit b50b54c

Browse files
committed
added start-stop timeout
1 parent f73832c commit b50b54c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ data "template_file" "container_definition" {
122122
repositoryCredentials = local.repositoryCredentials == "{}" ? "null" : local.repositoryCredentials
123123
resourceRequirements = local.resourceRequirements == "[]" ? "null" : local.resourceRequirements
124124
secrets = local.secrets == "[]" ? "null" : local.secrets
125+
startTimeout = var.startTimeout
126+
stopTimeout = var.stopTimeout
125127
systemControls = local.systemControls == "[]" ? "null" : local.systemControls
126128
ulimits = local.ulimits == "[]" ? "null" : local.ulimits
127129
user = var.user == "" ? "null" : var.user

templates/container-definition.json.tpl

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@
3333
"ulimits": ${ulimits},
3434
"user": "${user}",
3535
"volumesFrom": ${volumesFrom},
36-
"workingDirectory": "${workingDirectory}"
36+
"workingDirectory": "${workingDirectory}",
37+
"startTimeout": "${startTimeout},
38+
"stopTimeout": "${stopTimeout}"
3739
}

variables.tf

+11
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,17 @@ variable "secrets" {
219219
type = list(map(string))
220220
}
221221

222+
variable "startTimeout" {
223+
default = 120
224+
description = "Time duration (in seconds) to wait before giving up on resolving dependencies for a container."
225+
}
226+
227+
variable "stopTimeout" {
228+
default = 120
229+
description = "Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own."
230+
}
231+
232+
222233
variable "systemControls" {
223234
default = []
224235
description = "A list of namespaced kernel parameters to set in the container"

0 commit comments

Comments
 (0)