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): BastionHost deviceName example is wrong #29103

Closed
rantoniuk opened this issue Feb 14, 2024 · 8 comments · Fixed by #29114
Closed

(ec2): BastionHost deviceName example is wrong #29103

rantoniuk opened this issue Feb 14, 2024 · 8 comments · Fixed by #29114
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@rantoniuk
Copy link

rantoniuk commented Feb 14, 2024

Describe the bug

The example listed in the documentation renders:

1:27:28 PM | CREATE_FAILED        | AWS::EC2::Instance                    | BastionHost30F9ED05
Invalid device name EBSBastionHost (Service: AmazonEC2; Status Code: 400; Error Code: InvalidBlockDeviceMapping; Request ID: 3bd4a132-0230-4769-8ef5-5ceaa559ad36; P
roxy: null)

The proposed deviceName does not align with the supported ones.

Additionally:

volume: ec2.BlockDeviceVolume.ebs(10, { encrypted: true }),

has an implicit volumeType default of GP2, while it should now be GP3 by default if not specified.

Expected Behavior

The example from documentation should work when copy-pasted.

Current Behavior

As above.

Reproduction Steps

As above.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.127.0 (build 6c90efc)

Framework Version

No response

Node.js Version

v18.18.2

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

@rantoniuk rantoniuk added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 14, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Feb 14, 2024
@pahud
Copy link
Contributor

pahud commented Feb 14, 2024

Yes I guess we should have a PR to fix that. Thanks for the report. Are you interested to submit a PR for that?

@pahud pahud self-assigned this Feb 14, 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 Feb 14, 2024
@pahud pahud removed their assignment Feb 14, 2024
@mergify mergify bot closed this as completed in #29114 Feb 15, 2024
@mergify mergify bot closed this as completed in 6fbcce6 Feb 15, 2024
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.

1 similar comment
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.

@rantoniuk
Copy link
Author

@msambol any thoughts about GP2 vs GP3 default?

@hoegertn
Copy link
Contributor

@msambol any thoughts about GP2 vs GP3 default?

Changing this might lead to recreation of disks and is a breaking change. So only possible with feature flags.

@rantoniuk
Copy link
Author

@hoegertn so I understand that you're going to add a new feature flag for this so that newly created instances are actually following the current AWS platform defaults without explicitly setting this, right?
If there a related issue I can watch regarding this, I'd be interested to subscribe to it!

@hoegertn
Copy link
Contributor

The implementation of BastionHost and Instance that it uses internally currently does not specify the volume type but uses the CloudFormation default. So, if this should be changed, that needs to be implemented and then guarded by a feature flag to not break existing users. I'm not sure if this is planned currently.

@rantoniuk
Copy link
Author

rantoniuk commented Feb 15, 2024

Ah! I assumed it was internally hardcoded as a default in aws-cdk and wasn't aware it's coming from CloudFormation - so it would need actually an update on the platform side for the Cloudformation default to be updated.
Thanks for the info!

GavinZZ pushed a commit that referenced this issue Feb 22, 2024
Closes #29103. 

I tested the example and it deploys.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants