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 Antwort
1
Akzeptierte Antwort

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
beantwortet vor 2 Jahren
  • 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

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen