hi all, I have a resouce which used to be a c# voi...
# dotnet
l
hi all, I have a resouce which used to be a c# void where resource were created, and now it's refactored to a "proper" pulumi class - inheriting from pulumi "stack". When I do pulumi preview now, I get
Copy code
error: Duplicate resource URN 'urn:pulumi:<stuff>::pulumi:pulumi:Stack::<stuff>'; try giving it a unique name
anyone know if there's a way around this? The entire stack is the same, its just that I now inherit from the "stack" class so I can provide outputs. Is there any way of fixing this without having to tear down the stack?
n
i use the
return await …
method myself - but it sounds like the
Stack
class is trying to create something that already exists, ordinarily you might use import to fix this but idt you can import a stack.
maybe edit the state directly? what do you get if you do
pulumi stack export > blah
and then look for the URN referenced? it should have an entry under
resources
that has the matching
urn
and a
type
.
(wondering if the type is
pulumi:pulumi:Stack
or something else)
l
yup, its stack. I figure out the error, I need to initialize the program differently when subclassing from "stack". THanks!