From d4916d1c85f2a6c870c5158304540d6bb6060361 Mon Sep 17 00:00:00 2001 From: Sumu Pitchayan <35242245+sumupitchayan@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:45:05 -0400 Subject: [PATCH] Revert "chore(ecs): clarify it's possible to use image digest on fromEcrRepository (#27115)" This reverts commit 9f079110d55b77be57d564d9659c9b923ed8b60c. --- .../@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts | 7 ++----- packages/aws-cdk-lib/aws-ecs/lib/container-image.ts | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts b/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts index c6e4423b06b6d..8a48d1bbde767 100644 --- a/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts +++ b/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts @@ -26,12 +26,9 @@ export interface ContainerImageConfig { export abstract class ContainerImage { /** * Reference an image in an ECR repository - * - * @param repository ECR repository - * @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`) */ - public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest'): ContainerImage { - return new EcrImage(repository, tagOrDigest); + public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest'): ContainerImage { + return new EcrImage(repository, tag); } /** diff --git a/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts b/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts index 893a8f764180e..7ba6d6bf320d7 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts @@ -18,12 +18,9 @@ export abstract class ContainerImage { /** * Reference an image in an ECR repository - * - * @param repository ECR repository - * @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`) */ - public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest') { - return new EcrImage(repository, tagOrDigest); + public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest') { + return new EcrImage(repository, tag); } /**