Skip to content

Commit

Permalink
feat(ecs-patterns): Tagging support for scheduled tasks (#25222)
Browse files Browse the repository at this point in the history
This was enabled by PR #23838 which adds support for the `propagateTags` and `tags` attributes to the ecs-patterns module. With the changes in this PR, tags can now be applied to tasks that are launched as scheduled tasks with the proper tags passed through to the event target.

This PR contributes to (but does not completely close) #25106 .

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rdbatch authored Apr 21, 2023
1 parent 79881c5 commit 6da4eba
Show file tree
Hide file tree
Showing 21 changed files with 602 additions and 181 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "21.0.0",
"version": "31.0.0",
"files": {
"ca15a60f3a20460e6534c82e90142c42bda680cee1d53044cff4136cb5b7feb5": {
"45ee1817116bffce287e51bd4477bcad440916657502fad9157093fa3d54f67d": {
"source": {
"path": "aws-ecs-integ-ecs.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "ca15a60f3a20460e6534c82e90142c42bda680cee1d53044cff4136cb5b7feb5.json",
"objectKey": "45ee1817116bffce287e51bd4477bcad440916657502fad9157093fa3d54f67d.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,13 @@
]
},
"EcsParameters": {
"PropagateTags": "TASK_DEFINITION",
"TagList": [
{
"Key": "my-tag",
"Value": "my-tag-value"
}
],
"TaskCount": 2,
"TaskDefinitionArn": {
"Ref": "ScheduledEc2TaskScheduledTaskDef56328BA4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"20.0.0"}
{"version":"31.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "31.0.0",
"testCases": {
"scheduledEc2TaskTest/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"version": "21.0.0",
"version": "31.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
},
"aws-ecs-integ-ecs.assets": {
"type": "cdk:asset-manifest",
"properties": {
Expand All @@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ca15a60f3a20460e6534c82e90142c42bda680cee1d53044cff4136cb5b7feb5.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/45ee1817116bffce287e51bd4477bcad440916657502fad9157093fa3d54f67d.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -328,6 +322,12 @@
]
},
"displayName": "scheduledEc2TaskTest/DefaultTest/DeployAssert"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "31.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Loading

0 comments on commit 6da4eba

Please sign in to comment.