From 309bf0aca2aa219caedf3eb6dc6afbe2ecda6b66 Mon Sep 17 00:00:00 2001 From: Keir Badger Date: Fri, 18 Oct 2024 10:19:47 +0100 Subject: [PATCH] Add remote command line access to container exec --- main.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.tf b/main.tf index 4c7e469..d89b9db 100644 --- a/main.tf +++ b/main.tf @@ -9,6 +9,7 @@ resource "aws_ecs_service" "service" { deployment_minimum_healthy_percent = var.deployment_minimum_healthy_percent deployment_maximum_percent = var.deployment_maximum_percent health_check_grace_period_seconds = var.health_check_grace_period_seconds + enable_execute_command = true load_balancer { target_group_arn = var.target_group_arn @@ -59,6 +60,7 @@ resource "aws_ecs_service" "service_multiple_loadbalancers" { deployment_minimum_healthy_percent = var.deployment_minimum_healthy_percent deployment_maximum_percent = var.deployment_maximum_percent health_check_grace_period_seconds = var.health_check_grace_period_seconds + enable_execute_command = true dynamic "load_balancer" { for_each = var.multiple_target_group_arns @@ -112,6 +114,7 @@ resource "aws_ecs_service" "service_no_loadbalancer" { deployment_minimum_healthy_percent = var.deployment_minimum_healthy_percent deployment_maximum_percent = var.deployment_maximum_percent health_check_grace_period_seconds = var.health_check_grace_period_seconds + enable_execute_command = true ordered_placement_strategy { type = "spread" @@ -155,6 +158,7 @@ resource "aws_ecs_service" "service_for_awsvpc_no_loadbalancer" { deployment_minimum_healthy_percent = var.deployment_minimum_healthy_percent deployment_maximum_percent = var.deployment_maximum_percent health_check_grace_period_seconds = var.health_check_grace_period_seconds + enable_execute_command = true network_configuration { subnets = var.network_configuration_subnets