You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(autoscaling): update validation on maxInstanceLifetime (#19584)
### Summary
This patch fixes the following bugs in `maxInstanceLifetime` validation by aligning with [CFN doc](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-maxinstancelifetime):
- A lower bound of `maxInstanceLifetime` is 1 day, not 7-days.
- `maxInstanceLifetime` can have 0 which is used to clear a previously set value.
### Test
- Run unit test.
```
PASS test/auto-scaling-group.test.js
=============================== Coverage summary ===============================
Statements : 93.11% ( 419/450 )
Branches : 86.93% ( 286/329 )
Functions : 91.81% ( 101/110 )
Lines : 92.84% ( 402/433 )
================================================================================
```
- Deploy CFN template having `maxInstanceLifetime` as 86,400 and 0.
### Notes
Originally, this issue was reported by #12588.
----
### All Submissions:
* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)
### Adding new Unconventional Dependencies:
* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)
### New Features
* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
* [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments