Skip to content

Commit

Permalink
feat(ec2): t4g instances (#10817)
Browse files Browse the repository at this point in the history
Closes: #10816

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
grusy authored Oct 15, 2020
1 parent eb2c568 commit 5e0cd2b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion packages/@aws-cdk/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,16 @@ export enum InstanceClass {
*/
T3A = 't3a',

/**
* Burstable instances, 4th generation with Graviton2 processors
*/
BURSTABLE4_GRAVITON = 't4g',

/**
* Burstable instances, 4th generation with Graviton2 processors
*/
T4G = 't4g',

/**
* Memory-intensive instances, 1st generation
*/
Expand Down Expand Up @@ -545,4 +555,4 @@ export class InstanceType {
public toString(): string {
return this.instanceTypeIdentifier;
}
}
}
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-ec2/test/instance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ nodeunitShim({
new Instance(stack, 'Instance', {
vpc,
machineImage: new AmazonLinuxImage(),
instanceType: InstanceType.of(InstanceClass.MEMORY6_GRAVITON, InstanceSize.LARGE),
instanceType: InstanceType.of(InstanceClass.BURSTABLE4_GRAVITON, InstanceSize.LARGE),
});

// THEN
cdkExpect(stack).to(haveResource('AWS::EC2::Instance', {
InstanceType: 'r6g.large',
InstanceType: 't4g.large',
}));

test.done();
Expand Down

0 comments on commit 5e0cd2b

Please sign in to comment.