From 2492bf821a92cc40b21a59df38ff2b01a901a82e Mon Sep 17 00:00:00 2001 From: saumitra-dev Date: Fri, 12 Jul 2024 12:27:45 +0530 Subject: [PATCH] fix: failed to create ecs service due to empty list of container definitions --- main.tf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main.tf b/main.tf index 7b4c859..9e2d900 100644 --- a/main.tf +++ b/main.tf @@ -34,6 +34,18 @@ module "ecs_service" { launch_type = "EC2" requires_compatibilities = ["EC2"] + container_definitions = { + demo = { + image = "amazon/amazon-ecs-sample:latest" + port_mappings = [] + + readonly_root_filesystem = false + + enable_cloudwatch_logging = false + create_cloudwatch_log_group = false + } + } + enable_autoscaling = false autoscaling_policies = {}