Skip to content

Commit

Permalink
Support secret for ecs fargate task definition aws#1478
Browse files Browse the repository at this point in the history
* added secrets array to ContainerDefinitionOptions
* added secrets to renderContainerDefinition method
  • Loading branch information
john-watson-ppl committed Jul 17, 2019
1 parent 50c7319 commit 073b49c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-ecs/lib/container-definition.ts
Expand Up @@ -194,6 +194,13 @@ export interface ContainerDefinitionOptions {
* @default - No Linux paramters.
*/
readonly linuxParameters?: LinuxParameters;

/**
* The Secret property specifies an object representing the secret to expose to the container
* For more information, see [Specifying Sensitive Data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html)
* in the Amazon Elastic Container Service Developer Guide.
*/
readonly secrets?: Array<CfnTaskDefinition.SecretProperty>
}

/**
Expand Down Expand Up @@ -444,6 +451,7 @@ export class ContainerDefinition extends cdk.Construct {
healthCheck: this.props.healthCheck && renderHealthCheck(this.props.healthCheck),
links: this.links,
linuxParameters: this.linuxParameters && this.linuxParameters.renderLinuxParameters(),
secrets: this.props.secrets
};
}
}
Expand Down

0 comments on commit 073b49c

Please sign in to comment.