From 54bdf4b8eb5811b403e9fb61babd4e5ea6bd2146 Mon Sep 17 00:00:00 2001 From: Brian Valerius Date: Mon, 2 Dec 2024 14:36:00 -0600 Subject: [PATCH] add configure_at_launch option for volume block --- examples/fargate/main.tf | 5 +++++ modules/service/main.tf | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/fargate/main.tf b/examples/fargate/main.tf index c263e0b8..36f46fd8 100644 --- a/examples/fargate/main.tf +++ b/examples/fargate/main.tf @@ -191,6 +191,11 @@ module "ecs_task_definition" { # Task Definition volume = { ex-vol = {} + ex-vol2 = { + host_path = "/tmp" + # Only one volume can be configured at launch + configure_at_launch = true + } } runtime_platform = { diff --git a/modules/service/main.tf b/modules/service/main.tf index b7ecef9e..a7b14aa1 100644 --- a/modules/service/main.tf +++ b/modules/service/main.tf @@ -733,8 +733,9 @@ resource "aws_ecs_task_definition" "this" { } } - host_path = try(volume.value.host_path, null) - name = try(volume.value.name, volume.key) + host_path = try(volume.value.host_path, null) + name = try(volume.value.name, volume.key) + configure_at_launch = try(volume.value.configure_at_launch, null) } }