https://pulumi.com logo
#python
Title
# python
w

worried-queen-62794

04/21/2021, 2:34 AM
Hi. I have a strange problem where I am running refresh and it is failing with:
Copy code
pulumi-python:dynamic:Resource (GeneratedTemporaryPlatformSSHKey):
    error: Preview failed: Exception calling application: No module named 'ssh'
The strange thing about this is that I had already deleted this resource and module but its still in my state. There is no where in my code that is still referring to the ssh module so where is Pulumi getting this from?
r

red-match-15116

04/21/2021, 3:00 AM
The strange thing about this is that I had already deleted this resource and module but its still in my state.
How did you delete the resource and module?
refresh
checks your state against the provider and brings it in alignment. It will not not bring your code and your state in alignment. You can run
pulumi state rm
to remove specific resources from your state
w

worried-queen-62794

04/26/2021, 9:59 PM
I deleted the module on disk, removed all resources from my code that used it, and had run
pulumi up
since then. How does it know about that module? Where is that stored? AFAIK it wasn't in the state when I exported it (the resource was but I couldn't see anywhere that it knew what module it came from).