ecs-task-deploy icon indicating copy to clipboard operation
ecs-task-deploy copied to clipboard

Deploy fails when using secrets in task definition

Open ChristophP opened this issue 6 years ago • 1 comments

ECS has a feature where it is possible to populate env variables from the ssm parameter store. The task definition the looks kinda like this. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html

{
  "containerDefinitions": [{
    "secrets": [{
      "name": "environment_variable_name",
      "valueFrom": "arn:aws:ssm:region:aws_account_id:parameter/parameter_name"
    }]
  }]
}

In order for secrets to work the property "executionRoleArn" must be set in the task definition but unfortately that property is not preserved by this script.

I opened a pull request to fix this. Would be great if it could be merged in since our deployments rely on this package. Thanks for making it <3

ChristophP avatar Jun 18 '19 13:06 ChristophP

+1 please merge the PR as I need this too :)

jpcbarros avatar Sep 15 '19 20:09 jpcbarros