Commit c8d62f3
authored
fix(autoscaling): add an option to run validation when migrating to launch template (#34832)
This patch add an option to run validation when migrating to launch template, which checks if UpdatePolicy is specified.
### Issue # (if applicable)
Closes #34283.
### Reason for this change
To make migration to Launch Template safer.
### Description of changes
This change introduces an option flag to check whether or not UpdatePolicy is specified. As enforcing UpdatePolicy, existing EC2 instances based on Launch Configuration are terminated, and new EC2 instances based on Launch Template are launched, which always references IAM instance profile defined by Launch Template.
### Describe any new or updated permissions being added
N/A
### Description of how you validated changes
Added an unit test and integration test.
### 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 ba61463 commit c8d62f3
File tree
9 files changed
+540
-1784
lines changed- packages
- @aws-cdk-testing/framework-integ/test/aws-autoscaling/test
- integ.asg-lt.js.snapshot
- aws-cdk-lib/aws-autoscaling
- lib
- test
9 files changed
+540
-1784
lines changedLines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1103 | 1103 | | |
1104 | 1104 | | |
1105 | 1105 | | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1106 | 1147 | | |
1107 | 1148 | | |
1108 | 1149 | | |
| |||
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: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments