When using the Azure Pipeline Pulumi task in a Dev...
# azure
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.
Yeah I think what you are suggesting is probably the best way to do that right now. There is an
flag that you can pass to
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 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
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.