-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Currently it's not possible to run the ecs execute-command
action if the task-def sets readonlyRootFilesystem
to true. E.g.
aws ecs execute-command \
--region us-east-1 \
--cluster stg-internal-pet \
--task 355ef4d394294fdd91acb5af1876806f \
--container consul-ecs-controller \
--command "/bin/bash" \
--interactive
Given by default ECS Controller enables both:
- https://github.com/hashicorp/terraform-aws-consul-ecs/blob/main/modules/controller/main.tf#L65
- https://github.com/hashicorp/terraform-aws-consul-ecs/blob/main/modules/controller/main.tf#L20
Execute command won't work if some work arounds are implemented, like:
readonlyRootFilesystem
should befalse
(or, should not be configured) in task definition to use ECS Exec aws-containers/amazon-ecs-exec-checker#21 (comment)- https://toris.io/2021/06/using-ecs-exec-with-readonlyrootfilesystem-enabled-containers/
Or if we disable readonlyRootFilesystem when we decide to enable enable_execute_command
at the ECS service level.
Btw this issue was introduced by me here: 8a8b9b0
Metadata
Metadata
Assignees
Labels
No labels