Skip to content

Commit b7054cd

Browse files
authored
feat: Allow Toggling initProcessEnabled independent of enable_execute_command (#355)
* allow initProcessEnabled to be toggled even when ecs exec command is enabled * update comments
1 parent da21601 commit b7054cd

File tree

1 file changed

+3
-3
lines changed
  • modules/container-definition

1 file changed

+3
-3
lines changed

modules/container-definition/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ locals {
2828
# 2. We then merge in the `initProcessEnabled` attribute based on whether `enable_execute_command` is true or false
2929
# This also means we will always have something in `linuxParameters` (it will never be `null` or `{}`)
3030
# Terraform doesn't allow us to set `initProcessEnabled` to `true` on one side only of the conditional, so we have to merge it in on both sides
31-
# However, in the `true` case, we set it last to ensure `initProcessEnabled` is always `true` when `enable_execute_command` is true
32-
# and the "psuedo-default" is `false` when `enable_execute_command` is false (but can still be overridden by the user)
31+
# The default is `true` when `enable_execute_command` is true but can be overridden by the user
32+
# and the "pseudo-default" is `false` when `enable_execute_command` is false (but can still be overridden by the user)
3333
# tflint-ignore: terraform_naming_convention
34-
linuxParameters = var.enable_execute_command ? merge(local.trimedLinuxParameters, { "initProcessEnabled" : true }) : merge({ "initProcessEnabled" : false }, local.trimedLinuxParameters)
34+
linuxParameters = var.enable_execute_command ? merge({ "initProcessEnabled" : true }, local.trimedLinuxParameters) : merge({ "initProcessEnabled" : false }, local.trimedLinuxParameters)
3535

3636
# tflint-ignore: terraform_naming_convention
3737
trimmedRestartPolicy = { for k, v in var.restartPolicy : k => v if v != null }

0 commit comments

Comments
 (0)