https://pulumi.com logo
Title
p

powerful-printer-57241

05/27/2021, 9:16 AM
When using the Azure Pipeline Pulumi task in a DevOps pipeline, is there a way to detect simply if there is any change in a stack? We want to require a manual validation step in case the infrastructure is going to change, but the only way to check that I can think of is to run
pulumi preview --json
manually in a PowerShell script, parse the JSON output and act on whether there are any modifications.
c

clever-sunset-76585

05/27/2021, 3:25 PM
Yeah I think what you are suggesting is probably the best way to do that right now. There is an
--expect-no-changes
flag that you can pass to
preview
command that would fail the command if there were changes. But I don’t think that is too helpful for what you are looking to do perhaps.
👌 1
a

ancient-megabyte-79588

05/29/2021, 2:02 PM
A multi-stage pipeline with an approval between a stage with the pulumi task doing
pulumi preview
and a stage with a pulumi task doing the
pulumi up
?
p

powerful-printer-57241

05/29/2021, 5:55 PM
But how does one define the condition that the approval should only be required when there are some changes detected by
pulumi preview
? I already started putting together a solution based on
pulumi preview --json
, might share it if it proves to be stable.