Skip to content

Commit 90a41d5

Browse files
feat(ec2): add g6 instance (#30693)
### Issue # (if applicable) Closes #30683 ### Reason for this change G6 instances are not yet supported by CDK L2 ### Description of changes Added G6 instance class ### Description of how you validated changes Added `g6` to existing unit 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 ffd9d9c commit 90a41d5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts

+12
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,16 @@ export enum InstanceClass {
890890
*/
891891
G5G = 'g5g',
892892

893+
/**
894+
* Graphics-optimized instances, 6th generation
895+
*/
896+
GRAPHICS6 = 'graphics6',
897+
898+
/**
899+
* Graphics-optimized instances, 6th generation
900+
*/
901+
G6 = 'g6',
902+
893903
/**
894904
* Parallel-processing optimized instances, 2nd generation
895905
*/
@@ -1568,6 +1578,8 @@ export class InstanceType {
15681578
[InstanceClass.G5]: 'g5',
15691579
[InstanceClass.GRAPHICS5_GRAVITON2]: 'g5g',
15701580
[InstanceClass.G5G]: 'g5g',
1581+
[InstanceClass.GRAPHICS6]: 'g6',
1582+
[InstanceClass.G6]: 'g6',
15711583
[InstanceClass.PARALLEL2]: 'p2',
15721584
[InstanceClass.P2]: 'p2',
15731585
[InstanceClass.PARALLEL3]: 'p3',

Diff for: packages/aws-cdk-lib/aws-ec2/test/instance.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ describe('instance', () => {
126126
});
127127
test('instance architecture is correctly discerned for x86-64 instance', () => {
128128
// GIVEN
129-
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a', 'p4de', 'p5', 'm7i-flex']; // A sample of x86-64 instance classes
129+
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a', 'g6', 'p4de', 'p5', 'm7i-flex']; // A sample of x86-64 instance classes
130130

131131
for (const instanceClass of sampleInstanceClasses) {
132132
// WHEN

0 commit comments

Comments
 (0)