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개 답변
1
수락된 답변

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
답변함 2년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠