i try this pulumi state delete but i need to delet...
# general
b
i try this pulumi state delete but i need to delete almost all the resources 😕
g
you may need to script it, i've had to do that before
use
pulumi stack -u > resources.txt
to get everything, then go through & extract out the things that need deleting
then you can do something like
Copy code
while read resource; do
  pulumi state delete --target-dependents "$resource"
done < resources.txt
though do be very careful. You can add
-y
to make it do that automatically
just ... yeah be careful man
easy foot gun, that
maybe a good idea to manually backup your state file before you do any of that
b
Yes but you cannot do it in production this
g
why not
b
in production if you remove a resource then it will not be replace after ?
g
in production if you remove a resource then it will not be replace after ?
not if you get rid of the code in the pulumi project too?