From 5ca59a3ab2744115c97fa444951ff1be71a9d938 Mon Sep 17 00:00:00 2001 From: alain-lim <145108599+alain-lim@users.noreply.github.com> Date: Wed, 6 Aug 2025 23:05:38 +0000 Subject: [PATCH] Add runtime_platform operating_system_family variables --- main.tf | 4 ++++ variables.tf | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/main.tf b/main.tf index ea9b482..1a8ffcc 100644 --- a/main.tf +++ b/main.tf @@ -135,6 +135,10 @@ resource "aws_ecs_task_definition" "ecs_task_definition" { ipc_mode = var.ipc_mode network_mode = var.network_mode pid_mode = var.pid_mode + runtime_platform { + operating_system_family = var.runtime_platform.operating_system_family + cpu_architecture = var.runtime_platform.cpu_architecture + } # Fargate requires cpu and memory to be defined at the task level cpu = var.cpu diff --git a/variables.tf b/variables.tf index b34b1f2..14c125e 100644 --- a/variables.tf +++ b/variables.tf @@ -207,6 +207,15 @@ variable "resourceRequirements" { type = list(string) } +variable "runtime_platform" { + default = {} + description = "Runtime platform (operating system family and CPU architecture) to use by the task" + type = object({ + operating_system_family = optional(string, "LINUX") + cpu_architecture = optional(string, "X86_64") + }) +} + variable "secrets" { default = [] description = "The secrets to pass to the container"