https://pulumi.com logo
#general
Title
# general
g

gifted-soccer-82610

07/31/2023, 1:12 PM
Hi Guys, What is the best way to go about automating deletion of stack.
pulumi destroy
does not work with preview in non-interactive fashion. Anyone who has good ideas about goind about it? There are some open for the same like https://github.com/pulumi/pulumi/issues/10966 and https://github.com/pulumi/pulumi/issues/1666, but in the meantime was looking for some workaround
s

salmon-account-74572

07/31/2023, 2:41 PM
Does
pulumi destroy -y
not produce the desired result?
g

gifted-soccer-82610

08/01/2023, 6:21 AM
Hey @salmon-account-74572, This is destroy the cluster yes, but what I am looking for is preview, I have gitlab pipelines, preview --> apply, once preview succeeds, we will do apply, In current case preview doesn't work via automation script. something similar to
terraform plan -destroy -out destroyplan
s

salmon-account-74572

08/01/2023, 2:41 PM
OK, I think I get what you’re driving at. I don’t think there is a workaround at this point. Update plans (which are not yet GA) might help, but it’s too early to tell yet.