https://pulumi.com logo
#aws
Title
# aws
g

gifted-city-99717

08/04/2020, 8:51 PM
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

little-cartoon-10569

08/04/2020, 8:57 PM
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

gifted-city-99717

08/04/2020, 8:58 PM
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

little-cartoon-10569

08/04/2020, 8:59 PM
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

gifted-city-99717

08/04/2020, 9:00 PM
yeah, that’s a nice twist too -hah. me too!