Skip to content

Commit 18a7af4

Browse files
authored
Add option to enable ECS Exec (#41)
* Add option to enable ECS Exec * Run pre-commit
1 parent 1950652 commit 18a7af4

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.terraform.lock.hcl

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ In order to run all checks at any point run the following command:
6060

6161
| Name | Version |
6262
|------|---------|
63-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.0.0 |
63+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.1.0 |
6464

6565
## Modules
6666

6767
| Name | Source | Version |
6868
|------|--------|---------|
69-
| <a name="module_ecs-alb"></a> [ecs-alb](#module\_ecs-alb) | cn-terraform/ecs-alb/aws | 1.0.13 |
70-
| <a name="module_ecs-autoscaling"></a> [ecs-autoscaling](#module\_ecs-autoscaling) | cn-terraform/ecs-service-autoscaling/aws | 1.0.5 |
69+
| <a name="module_ecs-alb"></a> [ecs-alb](#module\_ecs-alb) | cn-terraform/ecs-alb/aws | 1.0.16 |
70+
| <a name="module_ecs-autoscaling"></a> [ecs-autoscaling](#module\_ecs-autoscaling) | cn-terraform/ecs-service-autoscaling/aws | 1.0.6 |
7171

7272
## Resources
7373

@@ -97,6 +97,7 @@ In order to run all checks at any point run the following command:
9797
| <a name="input_ecs_tasks_sg_allow_egress_to_anywhere"></a> [ecs\_tasks\_sg\_allow\_egress\_to\_anywhere](#input\_ecs\_tasks\_sg\_allow\_egress\_to\_anywhere) | (Optional) If true an egress rule will be created to allow traffic to anywhere (0.0.0.0/0). If false no egress rule will be created. Defaults to true | `bool` | `true` | no |
9898
| <a name="input_enable_autoscaling"></a> [enable\_autoscaling](#input\_enable\_autoscaling) | (Optional) If true, autoscaling alarms will be created. | `bool` | `true` | no |
9999
| <a name="input_enable_ecs_managed_tags"></a> [enable\_ecs\_managed\_tags](#input\_enable\_ecs\_managed\_tags) | (Optional) Specifies whether to enable Amazon ECS managed tags for the tasks within the service. | `bool` | `false` | no |
100+
| <a name="input_enable_execute_command"></a> [enable\_execute\_command](#input\_enable\_execute\_command) | (Optional) Specifies whether to enable Amazon ECS Exec for the tasks within the service. | `bool` | `false` | no |
100101
| <a name="input_force_new_deployment"></a> [force\_new\_deployment](#input\_force\_new\_deployment) | (Optional) Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered\_placement\_strategy and placement\_constraints updates. | `bool` | `false` | no |
101102
| <a name="input_health_check_grace_period_seconds"></a> [health\_check\_grace\_period\_seconds](#input\_health\_check\_grace\_period\_seconds) | (Optional) Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers. | `number` | `0` | no |
102103
| <a name="input_lb_deregistration_delay"></a> [lb\_deregistration\_delay](#input\_lb\_deregistration\_delay) | (Optional) The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. | `number` | `300` | no |

examples/test/.terraform.lock.hcl

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ resource "aws_ecs_service" "service" {
6464
deployment_minimum_healthy_percent = var.deployment_minimum_healthy_percent
6565
desired_count = var.desired_count
6666
enable_ecs_managed_tags = var.enable_ecs_managed_tags
67+
enable_execute_command = var.enable_execute_command
6768
health_check_grace_period_seconds = var.health_check_grace_period_seconds
6869
launch_type = "FARGATE"
6970
force_new_deployment = var.force_new_deployment

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ variable "force_new_deployment" {
9999
default = false
100100
}
101101

102+
variable "enable_execute_command" {
103+
description = "(Optional) Specifies whether to enable Amazon ECS Exec for the tasks within the service."
104+
type = bool
105+
default = false
106+
}
107+
102108
#------------------------------------------------------------------------------
103109
# AWS ECS SERVICE network_configuration BLOCK
104110
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)