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 Antworten
0

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

profile picture
Nicolas
beantwortet vor einem Jahr
  • 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
beantwortet vor einem Jahr
0

Could anybody help with this issue please ?

profile picture
Nicolas
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen