Does anyone have a recommended way to get a config...
# aws
g
Does anyone have a recommended way to get a config file (eg: a grafana datasource.yaml file) into an ECS container? I’ve been looking at EFS, but I’m not sure if using DataSync to push a single file to EFS makes sense - DataSync seems to be pretty involved to push a single file. And I don’t think Fargate supports data volumes. I think the only way to sanely do this is to build my own container and set the various config files when building the container. Anyone have a better idea?
l
I wouldn't call it best practice, but an easy solution is user data? https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bootstrap_container_instance.html
Until you get vaults going, I guess.
g
Oh, that’s an interesing idea. I didn’t know Fargate tasks have userdata
ah, i have ssm and the aws secrets manager, can I map an ssm parameter (or secrets manager) to a path?
l
A better idea is to bake your config file as a template into your images, then have your secrets added via env vars or vaults during deploy time.
Not sure how to do this.. I'm still on the path to enlightenment :)\
g
yeah, that’s a nice twist too -hah. me too!