Hey folks! I am new to pulumi and am facing an err...
# getting-started
n
Hey folks! I am new to pulumi and am facing an error deleting a resource from the stack. I tried to create an instance template using the pulumi python sdk (gcp) but that failed due to an error... the template did not get created but it was registered on the stack. Even on refresh, it is not getting cleared and removing the resource from the stack and then running again isn't working either ... I see there is a
--clear-pending-creates
option with the
refresh
command in the cli which is not available in the python sdk. how do i start using the same stack (stored at gcs) with the cli. also is there any other way to solve this error. Error: (when i try to remove it from the stack. )
Copy code
2024-04-18 02:06:14,697 INFO   gcp:compute:InstanceTemplate (*****************):
2024-04-18 02:06:14,698 INFO     error: deleting urn:pulumi:****::****::gcp:compute/instanceTemplate:InstanceTemplate::**************: 1 error occurred:
2024-04-18 02:06:14,698 INFO     	* Error deleting instance template: googleapi: Error 404: The resource 'projects/***********/global/instanceTemplates/*************' was not found, notFound
f
Whenever I've hit this in the past, I've had to manually edit the statefile. This was an interesting edge case I had to think about when making a custom dynamic provder - if the thing you want to delete doesn't exist, is that an error 🤔