-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
@aws-cdk/aws-ecsRelated to Amazon Elastic ContainerRelated to Amazon Elastic Containereffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1
Description
Currently it is possible to pass only strings to ContainerImage's buildArgs.
Feature request: Add an option to pass a secret to ContainerImage. This parameter can be called buildArgsSecrets or secrets as for QueueProcessingFargateService.
Use Case
I need to create a .ssh key on the machine at build time.
Proposed Solution
const image = ContainerImage.fromAsset('../project-processor', {
buildArgsSecrets: {
GIT_SSH_KEY: EcsSecret.fromSecretsManager(secret, 'gitSshKey'),
}
});
const service = new QueueProcessingFargateService(this, 'QueueProcessingFargateService', {
cluster,
queue,
image,
secrets: {
BOT_TOKEN: EcsSecret.fromSecretsManager(secret, 'botToken'),
}
});
Dockerfile:
ARG GIT_SSH_KEY
RUN echo "${GIT_SSH_KEY}" > /root/.ssh/git_user_key
This is a 🚀 Feature Request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ecsRelated to Amazon Elastic ContainerRelated to Amazon Elastic Containereffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1