Skip to content

Commit

Permalink
Add OS_Family and CPU_Arch options to Task Definition (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
g1t-out authored Sep 19, 2022
1 parent 8f386a4 commit 82b9ccd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ resource "aws_ecs_task_definition" "task" {
}
}
container_definitions = jsonencode(concat([local.container_definition], var.sidecar_containers))
runtime_platform {
operating_system_family = var.task_definition_os_family
cpu_architecture = var.task_definition_cpu_arch
}
}

resource "aws_ecs_service" "service" {
Expand Down
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ variable "task_definition_memory" {
type = number
}

variable "task_definition_os_family" {
description = "The OS of the container."
default = "LINUX"
}

variable "task_definition_cpu_arch" {
description = "CPU architecture of the container."
default = "X86_64"
}

variable "task_container_command" {
description = "The command that is passed to the container."
default = []
Expand Down

0 comments on commit 82b9ccd

Please sign in to comment.