https://pulumi.com logo
Title
s

straight-intern-54129

06/29/2021, 8:03 PM
Yesterday I had a fully operational stack. Then today I tried to re-import an Azure resource group with
pulumi import
that was protected. Now when I do
pulumi up
it gives an error saying that the stack itself is a duplicate, and I can't get it back to a working state.
pulumi:pulumi:Stack (PulumiArm-hco):
    error: Duplicate resource URN 'urn:pulumi:hco::PulumiArm::pulumi:pulumi:Stack::PulumiArm-hco'; try giving it a unique name
b

bored-oyster-3147

06/29/2021, 8:08 PM
you made no code changes to your pulumi program at all?
s

straight-intern-54129

06/29/2021, 8:12 PM
Actually I did add new AzureAD app registrations... and now that you mentioned it, I see that removing the additions causes the error to go away.
b

bored-oyster-3147

06/29/2021, 8:16 PM
Usually I see this error when calling one of the delegate overloads to initiate your pulumi program, and also instantiating your own
Pulumi.Stack
in your program. There can only be 1
Pulumi.Stack
instance in any given pulumi program and the delegate overloads for running a pulumi program (instead of providing a TStackType) usually instantiate a stack for you so you can inadvertently end up with 2 being instantiated But if you're just adding app registrations than I'm not sure, may need more information
s

straight-intern-54129

06/29/2021, 8:23 PM
Ok I see the problem now. I was trying to run my new app registrations separately instead of merging the new registrations together.
thank you
🙌 1