https://pulumi.com logo
#automation-api
Title
# automation-api
c

creamy-nail-67991

10/29/2021, 10:09 AM
Hi, I am looking for a way to 'preview' the changes before the destroy at .NET using an inline program automation. At the moment, the
DestroyAsync()
applies
--skip-preview
flag. Is there another way to achieve a similar result?
b

bored-activity-40468

10/29/2021, 9:40 PM
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

creamy-nail-67991

11/22/2021, 5:45 PM
@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