Skip to content

Commit 276e3a6

Browse files
feat(autoscaling): add support for InstanceRequirements property (#28464)
Closes #28393 > Basically [LaunchTemplateOverrides](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.LaunchTemplateOverrides.html) for L2 construct is missing the [InstanceRequirements](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancerequirements) attribute. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --------- Co-authored-by: Sumu Pitchayan <[email protected]>
1 parent 6a1e712 commit 276e3a6

File tree

10 files changed

+483
-174
lines changed

10 files changed

+483
-174
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.template.json

+52
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,58 @@
716716
}
717717
}
718718
},
719+
"AsgFromMipWithInstanceRequirementsASG8BFE597D": {
720+
"Type": "AWS::AutoScaling::AutoScalingGroup",
721+
"Properties": {
722+
"DesiredCapacity": "5",
723+
"MaxSize": "10",
724+
"MinSize": "0",
725+
"MixedInstancesPolicy": {
726+
"LaunchTemplate": {
727+
"LaunchTemplateSpecification": {
728+
"LaunchTemplateId": {
729+
"Ref": "MainLT4FC09097"
730+
},
731+
"Version": {
732+
"Fn::GetAtt": [
733+
"MainLT4FC09097",
734+
"LatestVersionNumber"
735+
]
736+
}
737+
},
738+
"Overrides": [
739+
{
740+
"InstanceRequirements": {
741+
"CpuManufacturers": [
742+
"intel"
743+
],
744+
"MemoryMiB": {
745+
"Min": 16384
746+
},
747+
"VCpuCount": {
748+
"Max": 8,
749+
"Min": 4
750+
}
751+
}
752+
}
753+
]
754+
}
755+
},
756+
"VPCZoneIdentifier": [
757+
{
758+
"Ref": "VPCPrivateSubnet1Subnet8BCA10E0"
759+
},
760+
{
761+
"Ref": "VPCPrivateSubnet2SubnetCFCDAA7A"
762+
}
763+
]
764+
},
765+
"UpdatePolicy": {
766+
"AutoScalingScheduledAction": {
767+
"IgnoreUnmodifiedGroupSizeProperties": true
768+
}
769+
}
770+
},
719771
"AsgWithGp3BlockdeviceInstanceSecurityGroup54D76206": {
720772
"Type": "AWS::EC2::SecurityGroup",
721773
"Properties": {

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/manifest.json

+14-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)