From 93681e07ad19c08f60eb2ee5748a2d55c6d2bc45 Mon Sep 17 00:00:00 2001 From: "k.goto" <24818752+go-to-k@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:35:47 +0900 Subject: [PATCH] feat(cloud9-alpha): support image ids for Amazon Linux 2023 and Ubuntu 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* --- .../@aws-cdk/aws-cloud9-alpha/lib/environment.ts | 14 ++++++++++++-- .../test/cloud9.environment.test.ts | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts b/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts index 3158a612061ef..06d9b57b8d2a7 100644 --- a/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts +++ b/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts @@ -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 diff --git a/packages/@aws-cdk/aws-cloud9-alpha/test/cloud9.environment.test.ts b/packages/@aws-cdk/aws-cloud9-alpha/test/cloud9.environment.test.ts index ea3705edb5162..8110b8f7b0d59 100644 --- a/packages/@aws-cdk/aws-cloud9-alpha/test/cloud9.environment.test.ts +++ b/packages/@aws-cdk/aws-cloud9-alpha/test/cloud9.environment.test.ts @@ -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,