Skip to content

Commit

Permalink
F/1468/cmd (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
BSick7 committed Jun 23, 2023
1 parent 72d3fe2 commit 2d52390
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.13.8 (Jun 23, 2023)
* Added optional `var.command` to override image `CMD`.

# 0.13.7 (Jun 21, 2023)
* Fixed "known after apply" for event capabilities.

Expand Down
2 changes: 2 additions & 0 deletions task.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
locals {
main_container_name = "main"
command = length(var.command) > 0 ? var.command : null

container_definition = {
name = local.main_container_name
command = local.command
image = "${local.service_image}:${local.app_version}"
essential = true
portMappings = [for port, obj in local.all_port_mappings : {
Expand Down
11 changes: 11 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ Use this variable to configure against docker hub, quay, etc.
EOF
}

variable "command" {
type = list(string)
default = []
description = <<EOF
This overrides the `CMD` specified in the image.
Specify a blank list to use the image's `CMD`.
Each token in the command is an item in the list.
For example, `echo "Hello World"` would be represented as ["echo", "\"Hello World\""].
EOF
}

variable "port" {
type = number
default = 80
Expand Down

0 comments on commit 2d52390

Please sign in to comment.