Commit 0d773b1
authored
fix(ecs): allow empty placementStrategies on EC2Service (#35580)
### Reason for this change
You can't remove placement strategies from an ECS service using CDK once they've been set.
### Description of changes
Same fix as #30382 but for `placementStrategies`. Apparently this was not done at that time because CloudFormation [previously did not have the appropriate semantics](#27572 (comment)) for setting PlacementStrategies to the empty array as it did for PlacementConstraints, but that is no longer the case. The CloudFormation docs [state](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-ecs-service.html#cfn-ecs-service-placementstrategies):
> To remove this property from your service resource, specify an empty PlacementStrategy array.
### Describe any new or updated permissions being added
N/A
### Description of how you validated changes
Unit and integration tests.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent db1d964 commit 0d773b1
File tree
14 files changed
+2366
-196
lines changed- packages
- @aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2
- integ.placement-strategies.js.snapshot
- aws-cdk-lib/aws-ecs
- lib/ec2
- test/ec2
14 files changed
+2366
-196
lines changedLines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments