-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-ecs): addSecret() for a ContainerDefinition #18959
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
p1
Comments
danwiltshire
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 13, 2022
github-actions
bot
added
the
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
label
Feb 13, 2022
peterwoodworth
added
effort/small
Small work item – less than a day of effort
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 15, 2022
FlorinAsavoaie
added a commit
to FlorinAsavoaie/aws-cdk
that referenced
this issue
Aug 30, 2022
FlorinAsavoaie
added a commit
to FlorinAsavoaie/aws-cdk
that referenced
this issue
Aug 30, 2022
4 tasks
FlorinAsavoaie
added a commit
to FlorinAsavoaie/aws-cdk
that referenced
this issue
Aug 30, 2022
FlorinAsavoaie
added a commit
to FlorinAsavoaie/aws-cdk
that referenced
this issue
Aug 31, 2022
FlorinAsavoaie
added a commit
to FlorinAsavoaie/aws-cdk
that referenced
this issue
Sep 1, 2022
FlorinAsavoaie
added a commit
to FlorinAsavoaie/aws-cdk
that referenced
this issue
Sep 1, 2022
FlorinAsavoaie
added a commit
to FlorinAsavoaie/aws-cdk
that referenced
this issue
Sep 1, 2022
mergify bot
pushed a commit
that referenced
this issue
Sep 2, 2022
…tiating them (#21826) ### Description Similar to `addEnvironment()`, an `addSecret()` method is useful to add secrets to ECS Containers after instantiating them via the constructor. ### Use Case The most important use-case is when writing Task Definition Extensions or Aspects to augment ECS services. For example, setting environment variables and secrets for a logging or monitoring solution. Right now, this can be done only using Escape Hatches and there is no higher level functionality to obtain this behaviour. ### Proposed Solution ```typescript const container = taskDefinition.addContainer('nginx', { image: ecs.ContainerImage.fromRegistry('nginx'), }); container.addSecret('SECRET_1', ecs.Secret.fromSecretsManager(secret)); container.addSecret('SECRET_2', ecs.Secret.fromSecretsManager(secretField, 'password')); ``` closes #18959 ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [X] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [X] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
p1
Description
Similar to addEnvironment() I'd like to add an addSecret() method.
Use Case
I'm using Aspects to configure third-party services on ECS services. For example, setting environment variables and secrets for a logging solution.
Today I'm using an escape hatch to add additional Secrets.
Proposed Solution
Other information
Have written code for this and I will link soon.
Acknowledge
The text was updated successfully, but these errors were encountered: