Skip to content

Commit

Permalink
Merge branch 'main' into fix-changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 28, 2022
2 parents c61e54b + 6925293 commit 746255f
Show file tree
Hide file tree
Showing 24 changed files with 5,636 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/@aws-cdk/aws-ecs-patterns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const loadBalancedEcsService = new ecsPatterns.ApplicationLoadBalancedEc2Service
TEST_ENVIRONMENT_VARIABLE1: "test environment variable 1 value",
TEST_ENVIRONMENT_VARIABLE2: "test environment variable 2 value",
},
command: ['command'],
entryPoint: ['entry', 'point'],
},
desiredCount: 2,
});
Expand All @@ -49,6 +51,8 @@ const loadBalancedFargateService = new ecsPatterns.ApplicationLoadBalancedFargat
cpu: 512,
taskImageOptions: {
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
command: ['command'],
entryPoint: ['entry', 'point'],
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,32 @@ export interface ApplicationLoadBalancedTaskImageOptions {
* @default - No labels.
*/
readonly dockerLabels?: { [key: string]: string };

/**
* The entry point that's passed to the container.
*
* This parameter maps to `Entrypoint` in the [Create a container](https://docs.docker.com/engine/api/v1.38/#operation/ContainerCreate) section
* of the [Docker Remote API](https://docs.docker.com/engine/api/v1.38/) and the `--entrypoint` option to
* [docker run](https://docs.docker.com/engine/reference/commandline/run/).
*
* For more information about the Docker `ENTRYPOINT` parameter, see https://docs.docker.com/engine/reference/builder/#entrypoint.
*
* @default none
*/
readonly entryPoint?: string[];

/**
* The command that's passed to the container. If there are multiple arguments, make sure that each argument is a separated string in the array.
*
* This parameter maps to `Cmd` in the [Create a container](https://docs.docker.com/engine/api/v1.38/#operation/ContainerCreate) section
* of the [Docker Remote API](https://docs.docker.com/engine/api/v1.38/) and the `COMMAND` parameter to
* [docker run](https://docs.docker.com/engine/reference/commandline/run/).
*
* For more information about the Docker `CMD` parameter, see https://docs.docker.com/engine/reference/builder/#cmd.
*
* @default none
*/
readonly command?: string[];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ export class ApplicationLoadBalancedEc2Service extends ApplicationLoadBalancedSe
secrets: taskImageOptions.secrets,
logging: logDriver,
dockerLabels: taskImageOptions.dockerLabels,
command: taskImageOptions.command,
entryPoint: taskImageOptions.entryPoint,
});
container.addPortMappings({
containerPort: taskImageOptions.containerPort || 80,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export class ApplicationLoadBalancedFargateService extends ApplicationLoadBalanc
environment: taskImageOptions.environment,
secrets: taskImageOptions.secrets,
dockerLabels: taskImageOptions.dockerLabels,
command: taskImageOptions.command,
entryPoint: taskImageOptions.entryPoint,
});
container.addPortMappings({
containerPort: taskImageOptions.containerPort || 80,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "21.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
"path": "AlbEc2ServiceWithCommandAndEntryPointDefaultTestDeployAssert91EF33D6.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "21.0.0",
"files": {
"5cad8ed71307fba8ab47a28a3d59925addf1d7a820bca9988c56a087e0476599": {
"source": {
"path": "aws-ecs-integ-alb-ec2-cmd-entrypoint.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "5cad8ed71307fba8ab47a28a3d59925addf1d7a820bca9988c56a087e0476599.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Loading

0 comments on commit 746255f

Please sign in to comment.