Im using the pulumi automation api, is there a way...
# aws
s
Im using the pulumi automation api, is there a way to turn the stdoutput into json? currently I do it like this:
Copy code
stdoutStreamer := optup.ProgressStreams(os.Stdout)
    _, err = stack.Up(context.Background(), stdoutStreamer)
    if err != nil {
        log.Fatalf("Failed to update stack: %v\n\n", err)
    }
Is there any simple and easy way to have the output formated in JSON? thanks.
r
You won't be able to get stdout as json, but you can subscribe to the engine events which will give you the underlying information that creates the stdout output. It's much more detailed, you likely won't need all of it, but it's super powerful in the information it provides.