From 399e40a276bd2b710586525a4f1edea7aee6da78 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:08:25 +0900 Subject: [PATCH 1/2] feat(cloud9-alpha): support image ids for Amazon Linux 2023 and Ubuntu 22.04 --- packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts | 10 +++++++++- .../aws-cloud9-alpha/test/cloud9.environment.test.ts | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts b/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts index 3158a612061ef..433e2f565787e 100644 --- a/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts +++ b/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts @@ -49,10 +49,18 @@ export enum ImageId { * Create using Amazon Linux 2 */ AMAZON_LINUX_2 = 'amazonlinux-2-x86_64', + /** + * Create using Amazon Linux 2023 + */ + AMAZON_LINUX_2023 = 'amazonlinux-2023-x86_64', /** * Create using Ubunut 18.04 */ - UBUNTU_18_04 = 'ubuntu-18.04-x86_64' + UBUNTU_18_04 = 'ubuntu-18.04-x86_64', + /** + * Create using Ubunut 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, From 025f74ef659cedf847b312a2f8e7c23c619cb60d Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:15:10 +0900 Subject: [PATCH 2/2] add a deprecated label --- packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts | 6 ++++-- 1 file changed, 4 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 433e2f565787e..06d9b57b8d2a7 100644 --- a/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts +++ b/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts @@ -54,11 +54,13 @@ export enum ImageId { */ AMAZON_LINUX_2023 = 'amazonlinux-2023-x86_64', /** - * Create using Ubunut 18.04 + * 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 Ubunut 22.04 + * Create using Ubuntu 22.04 */ UBUNTU_22_04 = 'ubuntu-22.04-x86_64', }