CircleCI-Public/aws-ecs-orb

Support enable-execute-command for run_task

cheethoe opened this issue · 3 comments

Describe Request:

I'm requesting the support for the --enable-execute-command option for the ecs run_task job/command

Examples:

Something like this

  - aws-ecs/run_task:
      cluster: <<parameters.cluster>>
      enable_execute_command: true
      run_task_output: /tmp/run_task_output.json
      security_group_ids: <<parameters.security_group_ids>>
      subnet_ids: <<parameters.subnet_ids>>
      task_definition: "${CCI_ORB_AWS_ECS_REGISTERED_TASK_DFN}"
  - run:
       name: Get Task ARN from run-task
       command: >-
         TASK_ARN=$(jq -r '.tasks[0].taskArn' /tmp/run_task_output.json) &&
         echo "export TASK_ARN='${TASK_ARN}'" >> "$BASH_ENV"
  - run:
        name: ECS Execute Command
        command: |
          aws ecs execute-command \
            --cluster <<parameters.cluster>> \
            --command '<<parameters.command>>' \
            --non-interactive \
            --task ${TASK_ARN}

Supporting Documentation Links:

https://docs.aws.amazon.com/cli/latest/reference/ecs/run-task.html#options
See the --enable-execute-command section

Created PR: #204 for this

is anybody out there?