I have a weird one, I am trying to reference an ex...
# getting-started
e
I have a weird one, I am trying to reference an existing ECR Repository:
Copy code
const ecrRepository = aws.ecr.getRepository({
  name: 'stream-accounts-receivable-driver',
});
But as part of the plan it wants to delete this repository:
b
did you previously define the repo in the code? what happened before you added that
getRepository
method?
e
Good question. Previously it was defined in this code, but then the definition was removed to do
getRepository
because this is used in multiple stacks. But my guess is because it was defined here it needs to stay that way otherwise the plan will try to delete it?
b
You just need to remove it from state. Run pulumi stack —show-urns to find its urn. Then do pulumi state delete to remove it
e
Thanks @billowy-army-68599