Skip to content

Commit

Permalink
chore(ec2): add mac2-m1ultra instance type (#30817)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

None

### Reason for this change

EC2 instance supports `mac2-m1ultra` instance type but `InstanceType` class does not support it.

### Description of changes

Add `MAC2_M1ULTRA` instance type

### Description of how you validated changes

None

### 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
badmintoncryer authored Aug 14, 2024
1 parent 0007a29 commit 537d3b2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
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 @@ -1170,6 +1170,16 @@ export enum InstanceClass {
*/
MAC2_M2PRO = 'mac2-m2pro',

/**
* Macintosh instances built on 2022 Mac Studio hardware powered by Apple silicon M1 Ultra processors
*/
MACINTOSH2_M1_ULTRA = 'macintosh2-m1-ultra',

/**
* Macintosh instances built on 2022 Mac Studio hardware powered by Apple silicon M1 Ultra processors
*/
MAC2_M1ULTRA = 'mac2-m1ultra',

/**
* Multi-stream video transcoding instances for resolutions up to 4K UHD, 1st generation
*/
Expand Down Expand Up @@ -1632,6 +1642,8 @@ export class InstanceType {
[InstanceClass.MAC2_M2]: 'mac2-m2',
[InstanceClass.MACINTOSH2_M2_PRO]: 'mac2-m2pro',
[InstanceClass.MAC2_M2PRO]: 'mac2-m2pro',
[InstanceClass.MACINTOSH2_M1_ULTRA]: 'mac2-m1ultra',
[InstanceClass.MAC2_M1ULTRA]: 'mac2-m1ultra',
[InstanceClass.VIDEO_TRANSCODING1]: 'vt1',
[InstanceClass.VT1]: 'vt1',
[InstanceClass.HIGH_PERFORMANCE_COMPUTING6_AMD]: 'hpc6a',
Expand Down
8 changes: 8 additions & 0 deletions packages/aws-cdk-lib/aws-ec2/test/instance-type.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { InstanceClass, InstanceSize, InstanceType } from '../lib';

describe('InstanceType', () => {
test('mac2 m1 ultra', () => {
const instanceType = InstanceType.of(InstanceClass.MAC2_M1ULTRA, InstanceSize.METAL);
expect(instanceType.toString()).toEqual('mac2-m1ultra.metal');
});
});

0 comments on commit 537d3b2

Please sign in to comment.