-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(aws-ecs): addSecret() for a ContainerDefinition #18959
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-ecsRelated to Amazon Elastic ContainerRelated to Amazon Elastic Containereffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1
Description
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
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'));Other information
Have written code for this and I will link soon.
Acknowledge
- I may be able to implement this feature request
- This feature might incur a breaking change
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ecsRelated to Amazon Elastic ContainerRelated to Amazon Elastic Containereffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1