I have a dynamic resource where I forgot to save a...
# general
a
I have a dynamic resource where I forgot to save an API key after creation. Now I can't delete it anymore, and Pulumi doesn't destroy the stack. I can delete the resource from the cloud provider manually, but how to I get it out of the stack again?
p
pulumi stack export >tmp.json then remove it from the json and pulumi import --file tmp.json
a
thanks!
hm no, the resource won't go away
p
the json that comes out β€œis” the stack, so if you remove something from it, pulumi forgets about it
a
Yes, I removed two objects from it, a default dynamic resource and my specific resource
hmhm, I fixed it by updating the proviser and making the delete a nop
Then I removed the actual resource manually from my cloud
thanks anyway, I guess that command will be helpful in the future :)
πŸ™Œ 1