Skip to content

Commit a434aed

Browse files
authored
feat(ecs-patterns): add minHealthyPercent and maxHealthyPercent props to NetworkMultipleTargetGroupsFargateService (#34516)
### Issue # (if applicable) Closes #34368. ### Reason for this change Setting minHealthyPercent on the `NetworkMultipleTargetGroupsFargateService` in ecs_patterns doesn't prevent the warning for not setting `minimumHealthyPercent` from being displayed. When explicitly setting the minimumHealthyPercent via the underlying L1, the warning still appears. This is noisy for users who monitor their deployments for notices/warnings/errors and should also be supported as a feature directly on the L3. ### Description of changes - Added `minHealthyPercent` and `maxHealthyPercent` properties to the `NetworkMultipleTargetGroupsFargateServiceProps` interface - Updated the `createFargateService` method to pass these properties to the underlying `FargateService` constructor - Added tests to verify that setting `minHealthyPercent` properly passes the value to the service and prevents warnings ### Describe any new or updated permissions being added No new or updated permissions are needed. ### Description of how you validated changes Added two unit tests: 1. To verify that setting minHealthyPercent and maxHealthyPercent correctly passes the values to the AWS::ECS::Service resource 2. To verify that setting minHealthyPercent prevents warnings from being displayed ### 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 9e41154 commit a434aed

12 files changed

+1536
-0
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.network-load-balanced-fargate-service-custom-health.js.snapshot/aws-ecs-integ-fargate-health-percentage.assets.json

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

Comments
 (0)