Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for enable_execute_command flag passed to ECS container-definition #179

Open
gtie opened this issue Feb 5, 2024 · 2 comments
Open

Comments

@gtie
Copy link

gtie commented Feb 5, 2024

Describe the Feature

ECS supports executing commands/opening a shell into the containers. The flag to enable this is documented at https://registry.terraform.io/modules/terraform-aws-modules/ecs/aws/latest/submodules/container-definition#input_enable_execute_command. No such flag, however, is supported by the terraform-aws-ecs-container-definition module.

Expected Behavior

Be able to turn on the enable_execute_command in the container definitions.

Use Case

Debugging failures in running containers is most convenient when there is the option to execute commands on them.

Describe Ideal Solution

Be able to pass the flag enable_execute_command to the module.

Alternatives Considered

No response

Additional Context

No response

@joe-niland
Copy link
Member

Hi @gtie

The cloudposse/terraform-aws-ecs-alb-service-task module supports enabling ECS Exec and I can confirm it works.

I notice that in the module you referenced, this flag set the InitProcessEnabled param to true within LinuxParameters.
It seems this is best practice but not essential.

That seems like a good addition to this module.

Will you be opening a PR?

@zahorniak
Copy link
Contributor

Hi @gtie,
This flag should be set on ECS Service https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service#enable_execute_command.

So you can't do it using this module because this module is only for Task definition: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants