Skip to content

Commit

Permalink
feat(cloud9-alpha): support image ids for Amazon Linux 2023 and Ubunt…
Browse files Browse the repository at this point in the history
…u 22.04 (#28346)

This PR supports new image ids for Amazon Linux 2023 and Ubuntu 22.04.

As for Amazon Linux 2023, it is not yet in the documentation or release notes, but I tried it in CloudFormation with success, so I added it. We can also check it from the Cloud9 console. If we should still wait, I will remove it.

![cloud9-al-2023](https://github.com/aws/aws-cdk/assets/24818752/ac253baa-fa2e-4275-b77e-f6fb9d7647e7)

And I added `@deprecated` to the Ubuntu 18.04, see:

> Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.

https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-imageid

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
go-to-k authored Dec 13, 2023
1 parent 0347a19 commit 93681e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,19 @@ export enum ImageId {
*/
AMAZON_LINUX_2 = 'amazonlinux-2-x86_64',
/**
* Create using Ubunut 18.04
* Create using Amazon Linux 2023
*/
UBUNTU_18_04 = 'ubuntu-18.04-x86_64'
AMAZON_LINUX_2023 = 'amazonlinux-2023-x86_64',
/**
* Create using Ubuntu 18.04
*
* @deprecated Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.
*/
UBUNTU_18_04 = 'ubuntu-18.04-x86_64',
/**
* Create using Ubuntu 22.04
*/
UBUNTU_22_04 = 'ubuntu-22.04-x86_64',
}
/**
* Properties for Ec2Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ test.each([

test.each([
[ImageId.AMAZON_LINUX_2, 'amazonlinux-2-x86_64'],
[ImageId.AMAZON_LINUX_2023, 'amazonlinux-2023-x86_64'],
[ImageId.UBUNTU_18_04, 'ubuntu-18.04-x86_64'],
[ImageId.UBUNTU_22_04, 'ubuntu-22.04-x86_64'],
])('has image ID property (%s)', (imageId, expected) => {
new cloud9.Ec2Environment(stack, 'C9Env', {
vpc,
Expand Down

0 comments on commit 93681e0

Please sign in to comment.