Commit b3edd0d
authored
feat(autoscaling): add new
### Issue # (if applicable)
Closes #31289 .
### Reason for this change
Only ONE HealthCheckType can be selected for an existing healthCheck property: EC2 or ELB.
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts#L233
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts#L2232-L2258
However, the current CFn specification allows multiple health check types to be specified, separated by commas.
> A comma-separated value string of one or more health check types.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#cfn-autoscaling-autoscalinggroup-healthchecktype
Also, besides EC2 and ELB, EBS and VPC_LATTICE can now be configured.
> The valid values are EC2, EBS, ELB, and VPC_LATTICE. EC2 is the default health check and cannot be disabled.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#cfn-autoscaling-autoscalinggroup-healthchecktype
If it was just EC2 and ELB, there would not be a need for multiple specifications. (Because specifying EC2 and another type at the same time would result in [a CFn error](#31286 (comment)). **This means that when specifying an ELB, it is a single specification.**)
But the increase in the number of these property types makes multiple specifications necessary. Therefore, **it is good to support the specification of multiple health check types and the addition of new types at the same time.**
See the docs for more details.
https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html
### Description of changes
So, I add a new `HealthChecks` class and `healthChecks` property.
- One or more health check types can be selected.
- Added EBS and VPC_LATTIC types.
And I deprecated the existing `healthCheck` property.
### Description of how you validated changes
Unit and integ 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*HealthChecks for multiple health check types, including EBS and VPC_LATTICE types (#31286)1 parent 4879c04 commit b3edd0d
13 files changed
Lines changed: 3182 additions & 5 deletions
File tree
- packages
- @aws-cdk-testing/framework-integ/test/aws-autoscaling/test
- integ.health-checks.js.snapshot
- aws-cdk-lib
- aws-autoscaling
- lib
- test
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments