Is there a way to remove a resource before `pulumi...
# general
n
Is there a way to remove a resource before
pulumi up
?
If
NotFoundException: No resolver found
, what should one do to get the stack update?
c
is pulumi state delete an option for you?
n
so just running
pulumi state delete
? And what does that do?
i guess that would work but since the resource can’t be found, i dont think that would work…
n
@nice-airport-15607 can you further clarify what you mean by “removing” a resource before
pulumi up
? did you run
pulumi up
previously but now your input resources mismatch the outputs created in the state file? Therefore when deleting or refreshing the state file for pulumi, you are getting an exception?
n
@narrow-area-11460 I had to
pulumi refresh
and then was able
pulumi up
. The resource was missing and I couldn’t push until that was fixed. What I mean by removing a resource was saying could one remove just one
aws:appsync:GraphQLApi
n
so pulumi state is saved in your local filesystem as well as the web service - basically each time you run an operation a snapshot is created -- it is possible that the snapshots of resources on your local filesystem and that on the web backend are not in sync. can you try
pulumi stack export > out
followed by
cat out | pulumi stack import
and then do
pulumi up
?
👍 1
n
@narrow-area-11460 thx for the advice, will keep this on hand for next time.
n
np - did it work?
n
i got it working prior to your idea, so its working atm. if me or my team run into this again, ill try your solution for sure.
👍 1
n
you could also just directly delete the resource that is missing from the state file -- you should be able to see the "URN" of the resource that is missing. If so, all you do is
pulumi stack delete <resource URN>
make sure you put the <resource URN> in quotes (single or double) else it says "URN not found" -- this is a known issue. Try both and let me know what works. Cheers!
n
ya that was the other option i noticed too. def will try these in the future as we’re new to pulumi.
n
🙂 thats awesome! would love to find out about your use case, which cloud is of interest and the company you are with, when the time is appropriate -- might be late for you and its Sunday 🙂
Happy Sunday Shawn!
n
we’re trying to move over to pulumi from severless. Our cloud is AWS services and our company is https://gpstrackit.com
thx @narrow-area-11460!
n
awesome! I ran Amazon EKS engg OSS -- if you have an architecture you are working with in AWS (service design), we could help you move faster. In any case, ping me if you have questions. Cheers!
💯 1
👍 1
hey Shawn! checking where you are with your use case -- yours is a particularly interesting one -- any chance we can connect and talk more with you 1:1? If so, what would be a good email?