Skip to content

Commit

Permalink
feat(ec2): Support for new EBS types (#12074)
Browse files Browse the repository at this point in the history
closes #12071

Added new EBS types released in re:Invent 2020 and fixed some documentation problems.  Some observations:

./packages/@aws-cdk/aws-elasticsearch/lib/domain.ts - The Elasticsearch service allows only General Purpose, Provisioned IOPS and Magnetic. 
./packages/@aws-cdk/aws-rds/lib/instance.ts - Storage types and the official link were added

For compatibility reasons, I kept the " GENERAL_PURPOSE_SSD" as GP2 and created a new type called "GENERAL_PURPOSE_SSD_GP3" for GP3. The same happened to IO1/IO2. Please let me know if it is correct, I think it is the best way to not break stacks that already exist with these definitions.

@NetaNir 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
leandrodamascena authored Jan 21, 2021
1 parent c01272c commit 6a2ce55
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
14 changes: 12 additions & 2 deletions packages/@aws-cdk/aws-autoscaling/lib/volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,25 @@ export enum EbsDeviceVolumeType {
STANDARD = 'standard',

/**
* Provisioned IOPS SSD
* Provisioned IOPS SSD - IO1
*/
IO1 = 'io1',

/**
* General Purpose SSD
* Provisioned IOPS SSD - IO2
*/
IO2 = 'io2',

/**
* General Purpose SSD - GP2
*/
GP2 = 'gp2',

/**
* General Purpose SSD - GP3
*/
GP3 = 'gp3',

/**
* Throughput Optimized HDD
*/
Expand Down
28 changes: 24 additions & 4 deletions packages/@aws-cdk/aws-ec2/lib/volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,25 @@ export enum EbsDeviceVolumeType {
STANDARD = 'standard',

/**
* Provisioned IOPS SSD
* Provisioned IOPS SSD - IO1
*/
IO1 = 'io1',

/**
* General Purpose SSD
* Provisioned IOPS SSD - IO2
*/
IO2 = 'io2',

/**
* General Purpose SSD - GP2
*/
GP2 = 'gp2',

/**
* General Purpose SSD - GP3
*/
GP3 = 'gp3',

/**
* Throughput Optimized HDD
*/
Expand All @@ -225,15 +235,25 @@ export enum EbsDeviceVolumeType {
SC1 = 'sc1',

/**
* General purpose SSD volume that balances price and performance for a wide variety of workloads.
* General purpose SSD volume (GP2) that balances price and performance for a wide variety of workloads.
*/
GENERAL_PURPOSE_SSD = GP2,

/**
* Highest-performance SSD volume for mission-critical low-latency or high-throughput workloads.
* General purpose SSD volume (GP3) that balances price and performance for a wide variety of workloads.
*/
GENERAL_PURPOSE_SSD_GP3 = GP3,

/**
* Highest-performance SSD volume (IO1) for mission-critical low-latency or high-throughput workloads.
*/
PROVISIONED_IOPS_SSD = IO1,

/**
* Highest-performance SSD volume (IO2) for mission-critical low-latency or high-throughput workloads.
*/
PROVISIONED_IOPS_SSD_IO2 = IO2,

/**
* Low-cost HDD volume designed for frequently accessed, throughput-intensive workloads.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-elasticsearch/lib/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export interface EbsOptions {
readonly volumeSize?: number;

/**
* The EBS volume type to use with the Amazon ES domain, such as standard, gp2, io1, st1, or sc1.
* The EBS volume type to use with the Amazon ES domain, such as standard, gp2, io1.
* For more information, see[Configuring EBS-based Storage]
* (https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs)
* in the Amazon Elasticsearch Service Developer Guide.
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-rds/lib/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ export interface DatabaseInstanceNewProps {
readonly availabilityZone?: string;

/**
* The storage type.
* The storage type. Storage types supported are gp2, io1, standard.
*
* @see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#Concepts.Storage.GeneralSSD
*
* @default GP2
*/
Expand Down

0 comments on commit 6a2ce55

Please sign in to comment.