https://pulumi.com logo
Title
s

strong-helmet-83704

02/03/2023, 11:54 PM
Hi Friends, When i perform a preview with a plan= export from the Automation API the format of the resultant json is different to
pulumi preview --json
How can i get the same output from the Automation API?
e

echoing-dinner-19531

02/04/2023, 12:24 AM
preview --json is just the summary diff displayed as json a plan export is a much richer data structure that includes far more than a preview diff to allow the engine to constraint later updates to do the same thing as the preview
s

strong-helmet-83704

02/04/2023, 12:25 AM
How can i get just the summary diff in json from the Automation API?
It would be nice if infracost could parse over the plan export… but it doesn’t seem to
or could i convert from the plan format into the preview format somehow?
e

echoing-dinner-19531

02/04/2023, 12:42 AM
I don't think this is exposed by automation api at the moment
s

strong-helmet-83704

02/04/2023, 12:43 AM
😞
e

echoing-dinner-19531

02/04/2023, 12:43 AM
It's come up a few times, something we need to look into. I do have a plan for a whole overhaul of automation api, but it's big work and hard to find time to do it
s

strong-helmet-83704

02/04/2023, 12:43 AM
I understand
what about export_stack() ?
e

echoing-dinner-19531

02/04/2023, 1:12 PM
That will give you a stack that's deployed, not a preview result
s

strong-helmet-83704

02/06/2023, 5:31 PM
For now i’m breaking out into a shell command to do what i need instead of using automation api… fine for a prototype but definitely very interested in seeing the Automation API overhaul!