03/14/2021, 8:56 AM
Is there any hidden flag or something that allows me to
pulumi destroy
in such a way that I destroy all the resources in the stack that are not protected (or for which protected is not dependent on)? As it stands now I've got 19 resources, of which there are 2 protected - the resource group itself and an azure KeyVault (such a pain to pingpong it up and down). I can't do pulumi destroy because it would delete the protected resources which is not permitted. I do not feel like finding and exporting the URNs of the remaining 17 resources and chaining a --target "urn". Any other way that anyone has figured out?


05/12/2021, 12:30 PM
Hi @better-shampoo-48884. I agree with you. I added a feature request for this. Have you found a decent workaround in the meantime?


05/12/2021, 3:12 PM
yeah, i've added a "create" flag to all groups of resources (i.e. the primary component resources) that allows me to turn them on and off.. i.e. remove all resources related to a cluster. or remove everything except the resource group and keyvaults.
not optimal, but useful functionality regardless - I can also use it to tune things like if a deployment needs scalesets or vms or container registries at all and suchlike.
🙌 1