From 53b818bacde0fbb08acc454f392a4347acbde83d Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Sat, 27 Sep 2025 20:22:02 -0700 Subject: [PATCH 1/2] allow initProcessEnabled to be toggled even when ecs exec command is enabled --- modules/container-definition/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/container-definition/main.tf b/modules/container-definition/main.tf index 2d8c765..608a1a6 100644 --- a/modules/container-definition/main.tf +++ b/modules/container-definition/main.tf @@ -31,7 +31,7 @@ locals { # However, in the `true` case, we set it last to ensure `initProcessEnabled` is always `true` when `enable_execute_command` is true # and the "psuedo-default" is `false` when `enable_execute_command` is false (but can still be overridden by the user) # tflint-ignore: terraform_naming_convention - linuxParameters = var.enable_execute_command ? merge(local.trimedLinuxParameters, { "initProcessEnabled" : true }) : merge({ "initProcessEnabled" : false }, local.trimedLinuxParameters) + linuxParameters = var.enable_execute_command ? merge({ "initProcessEnabled" : true }, local.trimedLinuxParameters) : merge({ "initProcessEnabled" : false }, local.trimedLinuxParameters) # tflint-ignore: terraform_naming_convention trimmedRestartPolicy = { for k, v in var.restartPolicy : k => v if v != null } From 6956ffc5ddacc5214964eeda9c1388be212cc518 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Mon, 29 Sep 2025 10:00:10 -0700 Subject: [PATCH 2/2] update comments --- modules/container-definition/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/container-definition/main.tf b/modules/container-definition/main.tf index 608a1a6..cf73471 100644 --- a/modules/container-definition/main.tf +++ b/modules/container-definition/main.tf @@ -28,8 +28,8 @@ locals { # 2. We then merge in the `initProcessEnabled` attribute based on whether `enable_execute_command` is true or false # This also means we will always have something in `linuxParameters` (it will never be `null` or `{}`) # 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 - # However, in the `true` case, we set it last to ensure `initProcessEnabled` is always `true` when `enable_execute_command` is true - # and the "psuedo-default" is `false` when `enable_execute_command` is false (but can still be overridden by the user) + # The default is `true` when `enable_execute_command` is true but can be overridden by the user + # and the "pseudo-default" is `false` when `enable_execute_command` is false (but can still be overridden by the user) # tflint-ignore: terraform_naming_convention linuxParameters = var.enable_execute_command ? merge({ "initProcessEnabled" : true }, local.trimedLinuxParameters) : merge({ "initProcessEnabled" : false }, local.trimedLinuxParameters)