This message was deleted.
# automation-api
s
This message was deleted.
b
Since you're using automation-api your destroy can call a PreviewAsync, prompt for confirmation and then call DestroyAsync. A great example of using the automation-api in .NET https://github.com/gitfool/Pulumi.Dungeon/blob/master/Cli/DeployCommand.cs
Actually, calling preview/destroy probably doesn't help you but the example is still good.
c
@bored-activity-40468 Thank you for your response. The preview - destroy will not work in my case as the
PreviewAsync
command returns the changes of the stack for an update. The preview before the destroy is just to ensure that we will not be deleting something we shouldn't be. The resource you provided though is quite neat!
Just for reference, of anyone interested on this issue See https://github.com/pulumi/pulumi/issues/8310
👍 1