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

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

profile picture
Nicolas
respondido há um ano
  • 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 há um ano
0

Could anybody help with this issue please ?

profile picture
Nicolas
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas