-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
(ecs): ContainerDefinition.addDockerLabel #29728
(ecs): ContainerDefinition.addDockerLabel #29728
Comments
@blimmer ,thanks for reaching out with this request and volunteering for PR contribution. |
@khushail - I'm not sure when I'll be able to get to this. Would you mind also throwing a "good first issue" tag on it? |
done! |
Hey @khushail , I'm looking for my first contribution here. Could you please assign this issue to me? |
Let me know if there are any other beginner friendly issues are still open. |
You can filter out the issues with label "good first issue" and would get a list like this and can pick to work on any issue, you want |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the feature
It would be nice to be able to add docker labels after the container has been constructed.
For example, I can call
addEnvironment
to add an environment variable after the fact: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinition.html#addwbrenvironmentname-valueHowever, I can't do the same with docker labels.
Use Case
I have a construct that automatically applies Datadog monitoring information to a TaskDefinition with an application container. Datadog requires that I set some information as Docker Labels for observability:
However, I want to add these labels after the user already created their default container.
Proposed Solution
Add a
.addDockerLabel
method similar to.addEnvironment
to theContainerDefiniton
construct. It'd be similar to #2559 / #17889Other Information
You can hack this like so:
But it's not ideal
Acknowledgements
CDK version used
2.135.0
Environment details (OS name and version, etc.)
MacOS Sonoma
The text was updated successfully, but these errors were encountered: