Skip to content

Commit eb15270

Browse files
feat: Add support for AWS ECS Exec
Feature: Adds support for AWS ECS Exec, allowing for interactive sessions and command execution inside a container. Useful to support triage and debug.
1 parent 14e03c4 commit eb15270

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ allow_github_webhooks = true
323323
| <a name="input_ecs_service_platform_version"></a> [ecs\_service\_platform\_version](#input\_ecs\_service\_platform\_version) | The platform version on which to run your service | `string` | `"LATEST"` | no |
324324
| <a name="input_ecs_task_cpu"></a> [ecs\_task\_cpu](#input\_ecs\_task\_cpu) | The number of cpu units used by the task | `number` | `256` | no |
325325
| <a name="input_ecs_task_memory"></a> [ecs\_task\_memory](#input\_ecs\_task\_memory) | The amount (in MiB) of memory used by the task | `number` | `512` | no |
326+
| <a name="input_ecs_service_enable_execute_command"></a> [ecs\_service\_enable\_execute\_command](#ecs\_service\_enable\_execute\_command) | Controls if ECS Service enable ECS execute command feature | `bool` | `true` | no |
326327
| <a name="input_enable_ecs_managed_tags"></a> [enable\_ecs\_managed\_tags](#input\_enable\_ecs\_managed\_tags) | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | `bool` | `false` | no |
327328
| <a name="input_entrypoint"></a> [entrypoint](#input\_entrypoint) | The entry point that is passed to the container | `list(string)` | `null` | no |
328329
| <a name="input_essential"></a> [essential](#input\_essential) | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value | `bool` | `true` | no |

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ resource "aws_ecs_service" "atlantis" {
605605
deployment_maximum_percent = var.ecs_service_deployment_maximum_percent
606606
deployment_minimum_healthy_percent = var.ecs_service_deployment_minimum_healthy_percent
607607
force_new_deployment = var.ecs_service_force_new_deployment
608+
enable_execute_command = var.ecs_service_enable_execute_command
608609

609610
network_configuration {
610611
subnets = local.private_subnet_ids

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -613,3 +613,9 @@ variable "ecs_service_force_new_deployment" {
613613
type = bool
614614
default = false
615615
}
616+
617+
variable "ecs_service_enable_execute_command" {
618+
description = "Enable ECS exec for the service. This can be used to allow interactive sessions and commands to be executed in the container"
619+
type = bool
620+
default = false
621+
}

0 commit comments

Comments
 (0)