This message was deleted.
# kubernetes
s
This message was deleted.
s
if all the resources only existed on the k8s cluster you could just do a
pulumi stack rm
and start fresh
b
There’s some stuff on S3 and RDS - I don’t have a problem nuking those, but probably would prefer to not orphan them (and would prefer to avoid doing it manually).
s
ah. in that case i'd run
Copy code
pulumi state delete
for every k8s resource
b
is there a way to find every resource that’s “pending deletion”
s
i don't know... might have to parse the state file for that. but
pulumi stack --show-urns
will give you all the URNs in your stack so you can just grep/filter for kubernetes resources
b
Copy code
$ pulumi state delete "urn:pulumi:tenant-itay8::okera-trial-tenants::kubernetes:apps/v1:Deployment::presto_coordinatorDeployment"
 warning: This command will edit your stack's state directly. Confirm? Yes
 Multiple resources with the given URN exist, please select the one to edit:  [Use arrows to move, enter to select, type to filter]
> "itay8/presto-coordinator"
  "itay8/presto-coordinator" (Pending Deletion)
Good to know multiple things with an URN can exist 🙂
b
it's expected behaviour yes, don't delete the cluster before you delete the resources, because otherwise the API to call no longer exists 😄
b
Good to know 🙂 What’s the best way to get out of it? Just delete the URNs one by one and select the “pending deletion” ones?
b
yeah basically that's your best option. You might find it easier to do
pulumi stack export > stack.json
update the json to remove the resources
pulumi stack import --file stack.json
b
In the stack.json, am I just looking for ones in which
"delete": true
is set?
since I seem to have two copies of each resource
OK that seemed to work