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

chore(ec2): add missing instance types #29427

Merged
merged 10 commits into from
Mar 11, 2024
Merged

Conversation

nmussy
Copy link
Contributor

@nmussy nmussy commented Mar 10, 2024

Issue # (if applicable)

Closes #23854

Reason for this change

Update the CDK EC2 instance class and size enums to match the current availability

Description of changes

Added the missing instance class and sizes

Description of how you validated changes

This was generated with the help of the same tool I used to create #29422, using the live SDK data to match against the CDK. For the instance types, I am using the DescribeInstanceTypes API command in multiple regions (us-east-1, us-east-2, us-west-1, eu-west-1.) As far as I could tell, the union of us-east-1 and us-east-2 cover all possible instance classes and sizes, but correct me if I'm wrong.

As a sanity check, I'm also checking that the CDK does not have more instance types and sizes that the SDK does. It does vary between regions, but of note, there were:

  • p4de, in developer preview
  • x2g, RDS exclusive and not returned by DescribeInstanceTypes

Finally, I am ignoring some of the previous generation instance classes missing from the CDK, as they are very outdated and weren't added in first place, i.e. c1, t1, m1, m2, and i2.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Mar 10, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team March 10, 2024 21:17
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Mar 10, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 10, 2024
@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. labels Mar 11, 2024
Copy link
Contributor

@msambol msambol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 11, 2024
Copy link
Contributor

@msambol msambol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 11, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 5cc82bc
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 11, 2024
Copy link
Contributor

mergify bot commented Mar 11, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 840ec97 into aws:main Mar 11, 2024
13 checks passed
mergify bot pushed a commit that referenced this pull request Mar 15, 2024
### Issue # (if applicable)

None

### Reason for this change

Follow up to #29427. Added a missing instance type, and minor fixes to the `IntanceType` class

### Description of changes

I'd missed an instance type, [`dl2q`](https://aws.amazon.com/ec2/instance-types/dl2q/), which was neither in `us-east-1` or `us-east-2`, but in `us-west-2`.

I've also added a couple of missing symbolic names, as well as fixed some differing comments between the key and its symbolic value (e.g. `M3` and `STANDARD3`)

I also re-ordered a couple of enum values, when the symbolic value was separated from its match

### Description of how you validated changes

Compared the CDK to the SDK to find the missing instance. Programmatically iterated over the comments of `IntanceType` to make sure the comments of the symbolic keys matched the one below. 

### 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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK 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 this pull request may close these issues.

aws_cdk.aws_ec2.InstanceClass: Support MAC2
4 participants