Skip to content

Commit

Permalink
feat(ec2): add g6 instance (#30693)
Browse files Browse the repository at this point in the history
### 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*
  • Loading branch information
mellevanderlinde committed Jul 18, 2024
1 parent ffd9d9c commit 90a41d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,16 @@ export enum InstanceClass {
*/
G5G = 'g5g',

/**
* Graphics-optimized instances, 6th generation
*/
GRAPHICS6 = 'graphics6',

/**
* Graphics-optimized instances, 6th generation
*/
G6 = 'g6',

/**
* Parallel-processing optimized instances, 2nd generation
*/
Expand Down Expand Up @@ -1568,6 +1578,8 @@ export class InstanceType {
[InstanceClass.G5]: 'g5',
[InstanceClass.GRAPHICS5_GRAVITON2]: 'g5g',
[InstanceClass.G5G]: 'g5g',
[InstanceClass.GRAPHICS6]: 'g6',
[InstanceClass.G6]: 'g6',
[InstanceClass.PARALLEL2]: 'p2',
[InstanceClass.P2]: 'p2',
[InstanceClass.PARALLEL3]: 'p3',
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-ec2/test/instance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('instance', () => {
});
test('instance architecture is correctly discerned for x86-64 instance', () => {
// GIVEN
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a', 'p4de', 'p5', 'm7i-flex']; // A sample of x86-64 instance classes
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a', 'g6', 'p4de', 'p5', 'm7i-flex']; // A sample of x86-64 instance classes

for (const instanceClass of sampleInstanceClasses) {
// WHEN
Expand Down

0 comments on commit 90a41d5

Please sign in to comment.