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

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

profile picture
Nicolas
respondido hace un año
  • 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
respondido hace un año
0

Could anybody help with this issue please ?

profile picture
Nicolas
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas