Skip to content

Commit 7f3152a

Browse files
authored
feat(events-targets): support enableExecuteCommand in EcsTask construct (#25639)
Users can run commands in or get a shell to a container running on an Amazon EC2 instance or on AWS Fargate with Amazon ECS Exec. `FargateService` and `Ec2Service` in `aws-ecs` supports the flag to enable Amazon ECS Exec, `enableExecuteCommand`. `EcsTask` in `aws-events-targets` also supports `enableExecuteCommand` in CloudFormation, but AWS CDK doesn't. This feature supports `enableExecuteCommand` flag also for `EcsTask`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 5837373 commit 7f3152a

File tree

11 files changed

+141
-70
lines changed

11 files changed

+141
-70
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-fargate-task.js.snapshot/EcsFargateTestDefaultTestDeployAssert36341BFB.assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "29.0.0",
2+
"version": "31.0.0",
33
"files": {
44
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
55
"source": {

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-fargate-task.js.snapshot/aws-ecs-integ-fargate.assets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"version": "29.0.0",
2+
"version": "31.0.0",
33
"files": {
4-
"30cd2908bd974e2e1f17ce2fd217f78c8377a301b45a4b7a471e00c77fdff513": {
4+
"4eef78557096850d7999e5b8dea53c92d3dfecb6360d19bff549c574432580e1": {
55
"source": {
66
"path": "aws-ecs-integ-fargate.template.json",
77
"packaging": "file"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "30cd2908bd974e2e1f17ce2fd217f78c8377a301b45a4b7a471e00c77fdff513.json",
12+
"objectKey": "4eef78557096850d7999e5b8dea53c92d3dfecb6360d19bff549c574432580e1.json",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-fargate-task.js.snapshot/aws-ecs-integ-fargate.template.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@
516516
}
517517
},
518518
"EcsParameters": {
519+
"EnableExecuteCommand": true,
519520
"LaunchType": "FARGATE",
520521
"NetworkConfiguration": {
521522
"AwsVpcConfiguration": {
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"21.0.0"}
1+
{"version":"31.0.0"}

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-fargate-task.js.snapshot/integ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "29.0.0",
2+
"version": "31.0.0",
33
"testCases": {
44
"EcsFargateTest/DefaultTest": {
55
"stacks": [

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-fargate-task.js.snapshot/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "29.0.0",
2+
"version": "31.0.0",
33
"artifacts": {
44
"aws-ecs-integ-fargate.assets": {
55
"type": "cdk:asset-manifest",
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/30cd2908bd974e2e1f17ce2fd217f78c8377a301b45a4b7a471e00c77fdff513.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4eef78557096850d7999e5b8dea53c92d3dfecb6360d19bff549c574432580e1.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [

0 commit comments

Comments
 (0)