fabfuel / ecs-deploy

Powerful CLI tool to simplify Amazon ECS deployments, rollbacks & scaling
Other
854 stars 148 forks source link

Add --secrets-env-file option #207

Closed cgrice closed 2 years ago

cgrice commented 2 years ago

This PR adds a new option, --secrets-env-file, which works in essentially the same way as --env-file but adds the key/value pairs from this file into the secrets in the task definition instead of the environment.

The goal here is to allow users to use files like the below:

ENV_SECRET=arn:aws:ssm:eu-west-1:1234567890:parameter/app/secret

which will result in secrets being added to the task definition in the format:

{ name: "ENV_SECRET",  valueFrom: "arn:aws:ssm:eu-west-1:1234567890:parameter/app/secret" }

This means, alongside a .env file, a single deploy can contain all the secrets and environment variables needed to configure an application correctly.

cgrice commented 2 years ago

@fabfuel any chance we can get this merged? would be great to use the mainline docker image for some of our apps that use this functionality :)

fabfuel commented 2 years ago

Thanks again for your contribution and sorry for the delay 🙌