-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(cloud9): support imageid when creating cloud9 environment #21194
Conversation
BREAKING CHANGE: imageId is now a required parameter for Cloud9 environments. Any stack without this parameter will fail.
BREAKING CHANGE: imageId is now a required parameter for Cloud9 environments. Any stack without this parameter will fail.
…ws-cdk into feat/cloud9_imageId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! This is great work. I just have a few comments below. Additionally, please update the other integration tests to expect AL2 instead of AL1. That's why the build is currently failing.
@@ -42,13 +42,14 @@ EC2 Environments are defined with `Ec2Environment`. To create an EC2 environment | |||
```ts | |||
// create a cloud9 ec2 environment in a new VPC | |||
const vpc = new ec2.Vpc(this, 'VPC', { maxAzs: 3}); | |||
new cloud9.Ec2Environment(this, 'Cloud9Env', { vpc }); | |||
new cloud9.Ec2Environment(this, 'Cloud9Env', { vpc }, imageId: cloud9.ImageId.AMAZON_LINUX_2,); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If imageId
is a prop, it would need to be inside the curly brackets, not outside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/** | ||
* Create using Amazon Linux 1 | ||
*/ | ||
AMAZON_LINUX_1 = 'amazonlinux-1-x86_64', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in maintenance support, which means that new instances shouldn't be created. Let's not include it in the options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed AMAZON_LINUX_1
@@ -29,7 +29,7 @@ export interface IEc2Environment extends cdk.IResource { | |||
*/ | |||
export enum ConnectionType { | |||
/** | |||
* Conect through SSH | |||
* Connect through SSH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this!
/** | ||
* The image ID used for creating an Amazon EC2 environment. | ||
* | ||
* Valid values are: AMAZON_LINUX, AMAZON_LINUX_2, and UBUNTU_18_04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove AL1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
updated image-id integ test to use integTest package
Pull request has been modified.
Thanks for your review @TheRealAmazonKendra |
Ah, luckily this is a simple issue, though it doesn't look like we have it documented very well. You just need to add |
Thanks @TheRealAmazonKendra - I have added in that line and was able to successfully run the yarn integ on my end. Looks like the CodeBuild step is still failing though! |
@Mergifyio update |
✅ Branch has been successfully updated |
Ugh, this again. This is a bug we had that got fixed this morning. The update I just did should fix it. It will rebase it main with the fix present. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one more tiny change, please. Besides this, as long as the build passes, this is good to go!
/** | ||
* The image ID used for creating an Amazon EC2 environment. | ||
* | ||
* Valid values are: AMAZON_LINUX_2, and UBUNTU_18_04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this line (just 114). They're already defined in the enum and this will just provide additional overhead to update in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - have pushed the change
Pull request has been modified.
I made a small change to the README because I'm kind of guessing about what caused the failure this time. Seeing if that works. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success! Thank you for all your hard work on this!
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). |
…1194) Allows users to include the imageId parameter to specify which EC2 AMI to be used when creating the environment. closes: aws#20908. Shout out to @jumic for beginning the fix. Unable to run yarn integ due to breaking change. BREAKING CHANGE: The imageId parameter is now required and deployments will fail without it ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Allows users to include the imageId parameter to specify which EC2 AMI to be used when creating the environment.
closes: #20908.
Shout out to @jumic for beginning the fix.
Unable to run yarn integ due to breaking change.
BREAKING CHANGE: The imageId parameter is now required and deployments will fail without it
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license