Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/container-definition/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ 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(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 }
Expand Down