From ca15aac3b0f52ff540af26f5e17a04b5e375c345 Mon Sep 17 00:00:00 2001 From: Robert Djurasaj Date: Mon, 13 Dec 2021 14:38:58 -0700 Subject: [PATCH] feat(ec2): add im4gn and is4gen instances (#17780) Newly announced `im4gn` and `is4gen` storage optimized instances: https://aws.amazon.com/blogs/aws/new-storage-optimized-amazon-ec2-instances-im4gn-and-is4gen-powered-by-aws-graviton2-processors/ ![image](https://user-images.githubusercontent.com/31543/144113879-5451ce52-eeb1-4ad2-ba80-8ac3d67ce533.png) ![image](https://user-images.githubusercontent.com/31543/144113921-b71f67a7-a1c6-425d-9dc6-4f0eed03c08e.png) CFN docs have already been updated: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-instancetype ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-ec2/lib/instance-types.ts | 20 +++++++++++++++++++ .../@aws-cdk/aws-ec2/test/instance.test.ts | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-ec2/lib/instance-types.ts b/packages/@aws-cdk/aws-ec2/lib/instance-types.ts index e9565391b0bf1..5f30f1493987a 100644 --- a/packages/@aws-cdk/aws-ec2/lib/instance-types.ts +++ b/packages/@aws-cdk/aws-ec2/lib/instance-types.ts @@ -442,6 +442,26 @@ export enum InstanceClass { */ I3EN = 'i3en', + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + STORAGE4_GRAVITON_NETWORK_OPTIMIZED = 'im4gn', + + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + IM4GN = 'im4gn', + + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + STORAGE4_GRAVITON_NETWORK_STORAGE_OPTIMIZED = 'is4gen', + + /** + * Storage optimized instances powered by Graviton2 processor, 4th generation + */ + IS4GEN = 'is4gen', + /** * Burstable instances, 2nd generation */ diff --git a/packages/@aws-cdk/aws-ec2/test/instance.test.ts b/packages/@aws-cdk/aws-ec2/test/instance.test.ts index 86326ef7242df..afd3570466eee 100644 --- a/packages/@aws-cdk/aws-ec2/test/instance.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/instance.test.ts @@ -122,7 +122,7 @@ describe('instance', () => { test('instance architecture is correctly discerned for arm instances', () => { // GIVEN const sampleInstanceClasses = [ - 'a1', 't4g', 'c6g', 'c6gd', 'c6gn', 'm6g', 'm6gd', 'r6g', 'r6gd', 'g5g', // current Graviton-based instance classes + 'a1', 't4g', 'c6g', 'c6gd', 'c6gn', 'm6g', 'm6gd', 'r6g', 'r6gd', 'g5g', 'im4gn', 'is4gen', // current Graviton-based instance classes 'a13', 't11g', 'y10ng', 'z11ngd', // theoretical future Graviton-based instance classes ];