Skip to content

Commit

Permalink
feat(autoscaling): deprecate launch configurations (under feature fla…
Browse files Browse the repository at this point in the history
…g) (#25910)

This PR focuses on supporting the deprecation of launch configurations when creating an auto scaling group. All new accounts created after December 31, 2023 will no longer be able to create launch configurations. An equivalent launch template will now be created by the AutoScalingGroup construct instead of a launch configuration.

Closes #23165

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
colifran committed Jul 6, 2023
1 parent 212b81b commit ff21c69
Show file tree
Hide file tree
Showing 294 changed files with 21,560 additions and 9,176 deletions.

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"21.0.0"}
{"version":"32.0.0"}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "21.0.0",
"version": "32.0.0",
"files": {
"8a3db2dee171afc18cb3c206a03f7f70b4bda8fd9614c0da580b2f78810392fa": {
"2841832c06c010f8f491de8a2e5357d55f766b91e8f708a0be48f2aec8a8cc59": {
"source": {
"path": "integ-autoscalinghook-queue.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "8a3db2dee171afc18cb3c206a03f7f70b4bda8fd9614c0da580b2f78810392fa.json",
"objectKey": "2841832c06c010f8f491de8a2e5357d55f766b91e8f708a0be48f2aec8a8cc59.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,27 +451,68 @@
]
}
},
"GroupLaunchConfigEA6271FF": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"GroupLaunchTemplate9C55CCE4": {
"Type": "AWS::EC2::LaunchTemplate",
"Properties": {
"ImageId": {
"Ref": "al2022AMIParameter"
},
"InstanceType": "t3.small",
"IamInstanceProfile": {
"Ref": "GroupInstanceProfileA2F3B693"
"LaunchTemplateData": {
"IamInstanceProfile": {
"Arn": {
"Fn::GetAtt": [
"GroupInstanceProfileA2F3B693",
"Arn"
]
}
},
"ImageId": {
"Ref": "al2023AMIParameter"
},
"InstanceType": "t3.small",
"Monitoring": {
"Enabled": false
},
"SecurityGroupIds": [
{
"Fn::GetAtt": [
"GroupInstanceSecurityGroupBAF83E2C",
"GroupId"
]
}
],
"TagSpecifications": [
{
"ResourceType": "instance",
"Tags": [
{
"Key": "Name",
"Value": "integ-autoscalinghook-queue/Group/LaunchTemplate"
}
]
},
{
"ResourceType": "volume",
"Tags": [
{
"Key": "Name",
"Value": "integ-autoscalinghook-queue/Group/LaunchTemplate"
}
]
}
],
"UserData": {
"Fn::Base64": "#!/bin/bash"
}
},
"SecurityGroups": [
"TagSpecifications": [
{
"Fn::GetAtt": [
"GroupInstanceSecurityGroupBAF83E2C",
"GroupId"
"ResourceType": "launch-template",
"Tags": [
{
"Key": "Name",
"Value": "integ-autoscalinghook-queue/Group/LaunchTemplate"
}
]
}
],
"UserData": {
"Fn::Base64": "#!/bin/bash"
}
]
},
"DependsOn": [
"GroupInstanceRole918A2AF7"
Expand All @@ -482,8 +523,16 @@
"Properties": {
"MaxSize": "1",
"MinSize": "0",
"LaunchConfigurationName": {
"Ref": "GroupLaunchConfigEA6271FF"
"LaunchTemplate": {
"LaunchTemplateId": {
"Ref": "GroupLaunchTemplate9C55CCE4"
},
"Version": {
"Fn::GetAtt": [
"GroupLaunchTemplate9C55CCE4",
"LatestVersionNumber"
]
}
},
"Tags": [
{
Expand Down Expand Up @@ -587,9 +636,9 @@
}
},
"Parameters": {
"al2022AMIParameter": {
"al2023AMIParameter": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-default-x86_64"
"Default": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64"
},
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "32.0.0",
"testCases": {
"queue-hook-test/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"version": "21.0.0",
"version": "32.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
},
"integ-autoscalinghook-queue.assets": {
"type": "cdk:asset-manifest",
"properties": {
Expand All @@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8a3db2dee171afc18cb3c206a03f7f70b4bda8fd9614c0da580b2f78810392fa.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2841832c06c010f8f491de8a2e5357d55f766b91e8f708a0be48f2aec8a8cc59.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -201,10 +195,10 @@
"data": "GroupInstanceProfileA2F3B693"
}
],
"/integ-autoscalinghook-queue/Group/LaunchConfig": [
"/integ-autoscalinghook-queue/Group/LaunchTemplate/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "GroupLaunchConfigEA6271FF"
"data": "GroupLaunchTemplate9C55CCE4"
}
],
"/integ-autoscalinghook-queue/Group/ASG": [
Expand All @@ -231,10 +225,10 @@
"data": "GroupLifecycleHookscaleoutB603BFDE"
}
],
"/integ-autoscalinghook-queue/al2022AMI.Parameter": [
"/integ-autoscalinghook-queue/al2023AMI.Parameter": [
{
"type": "aws:cdk:logicalId",
"data": "al2022AMIParameter"
"data": "al2023AMIParameter"
}
],
"/integ-autoscalinghook-queue/Exports/Output{\"Ref\":\"GroupASG3C6DFE3B\"}": [
Expand Down Expand Up @@ -266,6 +260,15 @@
"type": "aws:cdk:logicalId",
"data": "CheckBootstrapVersion"
}
],
"GroupLaunchConfigEA6271FF": [
{
"type": "aws:cdk:logicalId",
"data": "GroupLaunchConfigEA6271FF",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
]
}
]
},
"displayName": "integ-autoscalinghook-queue"
Expand All @@ -286,7 +289,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bdae540cd4baafd04bde1c5823b5c218b9a79b8d856a8e9a26151bedc547eacd.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/940d95f17af77e9d69bcd9a1d814bb63fb2753cb03fd1511bc6ea493b5f88f4c.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand All @@ -303,10 +306,10 @@
"queuehooktestDefaultTestDeployAssertCF5493DF.assets"
],
"metadata": {
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallAutoScalingsetDesiredCapacity/Default/Default": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallAutoScalingsetDesiredCapacity8d10985ccf5843cdfedb03afd84a535c/Default/Default": [
{
"type": "aws:cdk:logicalId",
"data": "AwsApiCallAutoScalingsetDesiredCapacity"
"data": "AwsApiCallAutoScalingsetDesiredCapacity8d10985ccf5843cdfedb03afd84a535c"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [
Expand All @@ -321,40 +324,40 @@
"data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/Default/Default": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff/Default/Default": [
{
"type": "aws:cdk:logicalId",
"data": "AwsApiCallSQSreceiveMessage"
"data": "AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/WaitFor/IsCompleteProvider/Invoke": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff/WaitFor/IsCompleteProvider/Invoke": [
{
"type": "aws:cdk:logicalId",
"data": "AwsApiCallSQSreceiveMessageWaitForIsCompleteProviderInvoke92C9A498"
"data": "AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ffWaitForIsCompleteProviderInvokeCE4391E6"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/WaitFor/TimeoutProvider/Invoke": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff/WaitFor/TimeoutProvider/Invoke": [
{
"type": "aws:cdk:logicalId",
"data": "AwsApiCallSQSreceiveMessageWaitForTimeoutProviderInvoke88C69E59"
"data": "AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ffWaitForTimeoutProviderInvokeCC645D0F"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/WaitFor/Role": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff/WaitFor/Role": [
{
"type": "aws:cdk:logicalId",
"data": "AwsApiCallSQSreceiveMessageWaitForRole90A5ABAA"
"data": "AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ffWaitForRole6C943659"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/WaitFor/Resource": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff/WaitFor/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "AwsApiCallSQSreceiveMessageWaitFor10141935"
"data": "AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ffWaitForE9B0A8F0"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertionResults": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff/AssertionResults": [
{
"type": "aws:cdk:logicalId",
"data": "AssertionResultsAwsApiCallSQSreceiveMessage"
"data": "AssertionResultsAwsApiCallSQSreceiveMessage1a19058edc984d85e0beb02f98d0d6ff"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Role": [
Expand All @@ -381,10 +384,10 @@
"data": "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallAutoScalingcompleteLifecycleAction/Default/Default": [
"/queue-hook-test/DefaultTest/DeployAssert/AwsApiCallAutoScalingcompleteLifecycleAction3b6f4a6668cc6de418d82d437885ddfb/Default/Default": [
{
"type": "aws:cdk:logicalId",
"data": "AwsApiCallAutoScalingcompleteLifecycleAction"
"data": "AwsApiCallAutoScalingcompleteLifecycleAction3b6f4a6668cc6de418d82d437885ddfb"
}
],
"/queue-hook-test/DefaultTest/DeployAssert/BootstrapVersion": [
Expand All @@ -401,6 +404,12 @@
]
},
"displayName": "queue-hook-test/DefaultTest/DeployAssert"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "21.0.0",
"version": "32.0.0",
"files": {
"b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": {
"36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4": {
"source": {
"path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle",
"path": "asset.36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip",
"objectKey": "36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"bdae540cd4baafd04bde1c5823b5c218b9a79b8d856a8e9a26151bedc547eacd": {
"940d95f17af77e9d69bcd9a1d814bb63fb2753cb03fd1511bc6ea493b5f88f4c": {
"source": {
"path": "queuehooktestDefaultTestDeployAssertCF5493DF.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "bdae540cd4baafd04bde1c5823b5c218b9a79b8d856a8e9a26151bedc547eacd.json",
"objectKey": "940d95f17af77e9d69bcd9a1d814bb63fb2753cb03fd1511bc6ea493b5f88f4c.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Loading

0 comments on commit ff21c69

Please sign in to comment.