ECS Docker labels: valueFrom

1

Hi everyone! Is there a way to inject a Parameter Store parameter into a Docker label value?

That can be done for the environment and logging variables via the valueFrom option but the Docker label values are ordinary strings, and I would like to avoid creating a new task definition just to update the e.g. version.

Any thoughts and ideas are appreciated!

1 Answer
1
Accepted Answer

Unsure which IaC you are using, but with AWS CloudFormation, you could use {{resolve:}} as documented here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm

Hope this helps ;)

profile picture
answered 2 years ago
  • As luck would have it, we're still not using any kind of IaC and cases like this one only reinforce the need for such a solution. Thank you for the idea! I'm gonna accept the answer; if anyone else comes across this, feel free to add to the discussion :D

  • If you are interested in simplicity and starting your IaC journey, checkout ECS Compose-X (https://docs.compose-x.io). I will put in a PR to allow a valueFrom on some properties, that's a good one, like what you are asking for. Dynamic configuration FTW.

  • Hey John, I apologize if if this isn't the right place for this question but it's the closest I could find to a DM: I wanted to ask if there is an ETA (either a concrete or an approximate one) for the aforementioned change? Any kind of estimate will do :D

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions