This message was deleted.
# general
s
This message was deleted.
a
But then you'll get an inconsistent state, no? Since resources can't run without a cluster.
c
Yes, but since the cluster was deleted, cant we assume that the resource was deleted ?
a
Not without destroying the resources first.
Technically you could just remove the resources from the stack afterwards, but that can be dangerous.
c
thank you.
a
That all depends on your use case as well. I can even envision some non-prod scenarios where you wouldn't even care about the state at all.
c
Yes, In my case I not care about the state after that step
Is a cluster that the Q.A tem will evaluate the software, and then the cluster will be destroyed.
And thats it.
a
I see, so you don't want to spend time destroying the resources individually
c
Yes. And some resource can be timed out, having to rerun pulumi destroy.
a
I'm sorry I can't help you with that. If I were in your shoes maybe I would just run an API call against whichever service you're using, bypassing Pulumi, but I don't know if that fits your use case or not.
Or maybe just run the
pulumi destroy
until it succeeds.
c
Thank you.
s
You can create one stack for k8s cluster creation and another stack for k8s resource creation. then you can destroy the k8s cluster creation stack which only destroys the cluster. after that you only need to cleanup the now orphaned states from the k8s resource stack. this can be done by exporting the stack, deleting all resources from the exported file and reimporting the cleaned stack. i'm sure this can be automated using some bash/sed magic.