Open JonathanLifschutz opened 2 years ago
A generic way to add extra keys to the container definition sounds great. Thanks for the offer to raise a PR, I look forward to reviewing it.
Two years later, but i'm keen on taking over this. The improvement to use "secrets" is good and i already hacked something for myself that works in my local env.
@JonathanLifschutz is my CTO so i know the original requirements as to where this issue came from quite well :) .
The improvement to add "environment" in a similar way is not needed as that is already handled by containerOverrides
here.
I may struggle to add tests (any suggestion on tests other then the import tests are welcome). I think i'll try to port some ec2 tests to ecs, but let's see how it goes.
@grochmal sounds good. Feel free to ping me for review.
AWS allows you to specify 'secrets' in container definitions. This avoids having to call secrets manager directly in the application code.
The secrets key-value pair would need to be added to this block below (and again for the worker) based on init parameters.
I envisage reusing the same pattern used by
_scheduler_extra_args
:N.B. there are other key-value pairs that it could be useful to specify, such as 'environment' for defining environment variables inline. These could be added in the same way, or better yet, in a more generic way that allows you to specify arbitrary containerDefinitions kwargs.
I'd be happy to provide a PR for either approach.