Skip to content

Commit

Permalink
fix: Allow setting linux_parameters without inconsistent left/right…
Browse files Browse the repository at this point in the history
… error (#136)
  • Loading branch information
bryantbiggs committed Nov 16, 2023
1 parent 9634f7f commit 45a37ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions examples/fargate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ module "ecs_service" {
log-driver-buffer-limit = "2097152"
}
}

linux_parameters = {
capabilities = {
drop = [
"NET_RAW"
]
}
}

memory_reservation = 100
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/container-definition/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ locals {
var.log_configuration
)

linux_parameters = var.enable_execute_command ? merge({ "initProcessEnabled" : true }, var.linux_parameters) : var.linux_parameters
linux_parameters = var.enable_execute_command ? merge({ "initProcessEnabled" : true }, var.linux_parameters) : merge({ "initProcessEnabled" : false }, var.linux_parameters)

definition = {
command = length(var.command) > 0 ? var.command : null
Expand Down

0 comments on commit 45a37ac

Please sign in to comment.