Skip to content

Commit 1f589a3

Browse files
piradeepkmergify[bot]
authored andcommitted
fix(ecs): default ecsmanagedtags and propagatetags to be undefined (#3887)
* fix(ecs): default ecsmanagedtags to be false * Update decdk snapshot * Address feedback * Remove extra comma * Address feedback
1 parent 4a4e1f3 commit 1f589a3

17 files changed

+25
-42
lines changed

packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.expected.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@
273273
]
274274
}
275275
},
276-
"EnableECSManagedTags": true,
277-
"PropagateTags": "SERVICE"
276+
"EnableECSManagedTags": false
278277
}
279278
},
280279
"FargateServiceSecurityGroup0A0E79CB": {

packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.expected.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,7 @@
777777
]
778778
}
779779
},
780-
"EnableECSManagedTags": true,
781-
"PropagateTags": "SERVICE"
780+
"EnableECSManagedTags": false
782781
},
783782
"DependsOn": [
784783
"FargateServiceLBPublicListenerECSGroupBE57E081",

packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.expected.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,7 @@
607607
]
608608
}
609609
},
610-
"EnableECSManagedTags": true,
611-
"PropagateTags": "SERVICE"
610+
"EnableECSManagedTags": false
612611
},
613612
"DependsOn": [
614613
"L3LBPublicListenerECSGroup648EEA11",

packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-autocreate.expected.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,7 @@
258258
]
259259
}
260260
},
261-
"EnableECSManagedTags": true,
262-
"PropagateTags": "SERVICE"
261+
"EnableECSManagedTags": false
263262
},
264263
"DependsOn": [
265264
"L3LBPublicListenerECSGroup648EEA11",
@@ -907,8 +906,7 @@
907906
]
908907
}
909908
},
910-
"EnableECSManagedTags": true,
911-
"PropagateTags": "SERVICE"
909+
"EnableECSManagedTags": false
912910
},
913911
"DependsOn": [
914912
"L3bLBPublicListenerECSGroup0070C5CA",

packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3-vpconly.expected.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,7 @@
601601
]
602602
}
603603
},
604-
"EnableECSManagedTags": true,
605-
"PropagateTags": "SERVICE"
604+
"EnableECSManagedTags": false
606605
},
607606
"DependsOn": [
608607
"L3LBPublicListenerECSGroup648EEA11",
@@ -1250,8 +1249,7 @@
12501249
]
12511250
}
12521251
},
1253-
"EnableECSManagedTags": true,
1254-
"PropagateTags": "SERVICE"
1252+
"EnableECSManagedTags": false
12551253
},
12561254
"DependsOn": [
12571255
"L3bLBPublicListenerECSGroup0070C5CA",
@@ -1556,8 +1554,7 @@
15561554
]
15571555
}
15581556
},
1559-
"EnableECSManagedTags": true,
1560-
"PropagateTags": "SERVICE"
1557+
"EnableECSManagedTags": false
15611558
},
15621559
"DependsOn": [
15631560
"L3cLBPublicListenerECSGroup62D7B705",

packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.expected.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,7 @@
583583
}
584584
}
585585
],
586-
"EnableECSManagedTags": true,
587-
"PropagateTags": "SERVICE",
586+
"EnableECSManagedTags": false,
588587
"NetworkConfiguration": {
589588
"AwsvpcConfiguration": {
590589
"AssignPublicIp": "DISABLED",

packages/@aws-cdk/aws-ecs/lib/base/base-service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ export interface BaseServiceOptions {
8181
/**
8282
* Specifies whether to propagate the tags from the task definition or the service to the tasks in the service
8383
*
84-
* Valid values are: PropagateTagFromType.SERVICE, PropagateTagFromType.TASK_DEFINITION or PropagateTagFromType.NONE
84+
* Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
8585
*
86-
* @default - PropagatedTagSource.SERVICE if EC2 or Fargate Service, otherwise PropagatedTagSource.NONE.
86+
* @default PropagatedTagSource.NONE
8787
*/
8888
readonly propagateTags?: PropagatedTagSource;
8989

9090
/**
9191
* Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see
9292
* [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
9393
*
94-
* @default true
94+
* @default false
9595
*/
9696
readonly enableECSManagedTags?: boolean;
9797
}
@@ -191,7 +191,7 @@ export abstract class BaseService extends Resource
191191
minimumHealthyPercent: props.minHealthyPercent === undefined ? 50 : props.minHealthyPercent
192192
},
193193
propagateTags: props.propagateTags === PropagatedTagSource.NONE ? undefined : props.propagateTags,
194-
enableEcsManagedTags: props.enableECSManagedTags === undefined ? true : props.enableECSManagedTags,
194+
enableEcsManagedTags: props.enableECSManagedTags === undefined ? false : props.enableECSManagedTags,
195195
launchType: props.launchType,
196196
healthCheckGracePeriodSeconds: this.evaluateHealthGracePeriod(props.healthCheckGracePeriod),
197197
/* role: never specified, supplanted by Service Linked Role */

packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class Ec2Service extends BaseService implements IEc2Service, elb.ILoadBal
135135
maxHealthyPercent: props.daemon && props.maxHealthyPercent === undefined ? 100 : props.maxHealthyPercent,
136136
minHealthyPercent: props.daemon && props.minHealthyPercent === undefined ? 0 : props.minHealthyPercent,
137137
launchType: LaunchType.EC2,
138-
propagateTags: props.propagateTaskTagsFrom === undefined ? PropagatedTagSource.SERVICE : props.propagateTaskTagsFrom,
138+
propagateTags: props.propagateTaskTagsFrom === undefined ? PropagatedTagSource.NONE : props.propagateTaskTagsFrom,
139139
enableECSManagedTags: props.enableECSManagedTags,
140140
},
141141
{

packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class FargateService extends BaseService implements IFargateService {
9494
...props,
9595
desiredCount: props.desiredCount !== undefined ? props.desiredCount : 1,
9696
launchType: LaunchType.FARGATE,
97-
propagateTags: props.propagateTaskTagsFrom === undefined ? PropagatedTagSource.SERVICE : props.propagateTaskTagsFrom,
97+
propagateTags: props.propagateTaskTagsFrom === undefined ? PropagatedTagSource.NONE : props.propagateTaskTagsFrom,
9898
enableECSManagedTags: props.enableECSManagedTags,
9999
}, {
100100
cluster: props.cluster.clusterName,

packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,7 @@
859859
}
860860
},
861861
"SchedulingStrategy": "REPLICA",
862-
"PropagateTags": "SERVICE",
863-
"EnableECSManagedTags": true
862+
"EnableECSManagedTags": false
864863
},
865864
"DependsOn": [
866865
"LBPublicListenerECSGroupD6A32205",

0 commit comments

Comments
 (0)