Is it possible to destroy resources by provider? e...
# general
Is it possible to destroy resources by provider? e.g I have resources managed by k8s/aws in the same stack and I want to delete resources under aws only.
Not as simply as just by provider, but there is
to limit the destroy operation to only those resources targetted.
Or comment out the code! Feature flags are a good option too.
thanks for the suggestions guys. Commenting code out is what I am doing atm. The problem is our codebase is not organised by provider e.g all resources go under
dir and are exposed via an entry file like
. But anyway it sounds like it’s not that simply to be implemented. I will re-order them for now.
You could try doing some shell magic to get the list of resources.
pulumi stack export
will give a json dump of the whole state, which you could run through a tool like
to grab out all the resource URNs and grep for the ones with "::aws" in them for example.
👍 1