Java CDK: Create ECR inserts a "null" in the repository name

0

Hello,

I'm using Java CDK to create a new ECR instance. Here is a code fragment:

Repository.Builder.create(scope, id).imageScanOnPush(true)
  .repositoryName("my-registry").removalPolicy(RemovalPolicy.DESTROY).build();

Looking in the AWS Console, the name of the new created repository is "null/my-registry" instead of "my-registry". If I create the new ECR instance in AWS Console then its name is created as expected, i.e. "my-registry" and not "null/my-registry".

What am I doing wrong here ?

Many thanks in advance.

Nicolas

  • I tried to replicate this issue, but it works fine for me. What's your CDK version?

3回答
0

I'm using the 2.69.0 (build 60a5b2a) version of CDK.

profile picture
Nicolas
回答済み 1年前
  • ok, I tried with same version and I don't see the issue. Are you setting this as a public repository?

0

ECS

No, that's a private one. I've attached a screen copy showing a couple of registries created with the code excerpt above.

profile picture
Nicolas
回答済み 1年前
0

Could anybody help with this issue please ?

profile picture
Nicolas
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ