https://pulumi.com logo
#general
Title
# general
n

nice-airport-15607

06/14/2019, 10:40 PM
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

chilly-crayon-57653

06/14/2019, 10:48 PM
is pulumi state delete an option for you?
n

nice-airport-15607

06/14/2019, 10:53 PM
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

narrow-area-11460

06/15/2019, 12:43 PM
@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

nice-airport-15607

06/16/2019, 12:07 AM
@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

narrow-area-11460

06/16/2019, 4:30 PM
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

nice-airport-15607

06/16/2019, 4:38 PM
@narrow-area-11460 thx for the advice, will keep this on hand for next time.
n

narrow-area-11460

06/16/2019, 4:39 PM
np - did it work?
n

nice-airport-15607

06/16/2019, 4:40 PM
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

narrow-area-11460

06/16/2019, 4:40 PM
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

nice-airport-15607

06/16/2019, 4:42 PM
ya that was the other option i noticed too. def will try these in the future as we’re new to pulumi.
n

narrow-area-11460

06/16/2019, 4:43 PM
🙂 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

nice-airport-15607

06/16/2019, 4:47 PM
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

narrow-area-11460

06/16/2019, 4:50 PM
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?
56 Views