Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2: change default Volume.volumeType and/or change generic EbsDeviceVolumeType #29931

Closed
1 of 2 tasks
azatoth opened this issue Apr 23, 2024 · 3 comments · Fixed by #29934
Closed
1 of 2 tasks

ec2: change default Volume.volumeType and/or change generic EbsDeviceVolumeType #29931

azatoth opened this issue Apr 23, 2024 · 3 comments · Fixed by #29934
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@azatoth
Copy link
Contributor

azatoth commented Apr 23, 2024

Describe the feature

Change Volume.volumeType default to be EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3, and rename EbsDeviceVolumeType.GENERAL_PURPOSE_SSD to EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP2

Use Case

People incur extra cost because they might not know that they should change the volume type from the default GP2 which is discouraged to use.

Proposed Solution

No response

Other Information

Currently Volume.volumeType defaults to EbsDeviceVolumeType.GENERAL_PURPOSE_SSD which refers to GP2; I think it might be time to switch the default to GP3; The naming of EbsDeviceVolumeType.GENERAL_PURPOSE_SSD for GP2 is unfortunate and should probably be deprecated for a EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP2 instead.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

v2.138

Environment details (OS name and version, etc.)

Ubuntu 22.04.4

@azatoth azatoth added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 23, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Apr 23, 2024
@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Apr 23, 2024
@pahud pahud assigned pahud and unassigned pahud Apr 23, 2024
@pahud
Copy link
Contributor

pahud commented Apr 23, 2024

Love this idea but I guess we can't switch the EbsDeviceVolumeType enum using feature flag if we plan to make EbsDeviceVolumeType.GENERAL_PURPOSE_SSD point to EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3. But we can change the default volume type for EBS here if volumeType is undefined.

i.e.

volumeType: props.volumeType ?? EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3,

Looking at the EBS console, the default volume type for a new ebs is now gp3 so I think it makes sense here.

image

@mergify mergify bot closed this as completed in #29934 Apr 30, 2024
mergify bot pushed a commit that referenced this issue Apr 30, 2024
### Issue # (if applicable)

As the EBS console is now having `gp3` as the default volumeType, this PR set the default volumeType to gp3 if undefined under feature flag.

Closes #29931

### Reason for this change



### Description of changes



### Description of how you validated changes

I have deployed the sample below and verified the volume type is `gp3` from console.

```ts
import { Stack, App, Size, aws_ec2 as ec2 } from 'aws-cdk-lib';
import * as cxapi from 'aws-cdk-lib/cx-api';

const app = new App();

const stack = new Stack(app, 'demo-stack');

stack.node.setContext(cxapi.EBS_DEFAULT_GP3, true);

// should create a gp3 volume
new ec2.Volume(stack, 'Volume', {
  availabilityZone: 'us-east-1a',
  size: Size.gibibytes(500),
});


```



### 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*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants