any easy way to run `pulumi up` programatically?
# general
t
any easy way to run
pulumi up
programatically?
c
pulumi up --yes
or
pulumi up --non-interactive
t
any way to get json output?
c
@tall-monitor-77779 I believe there is not an API for Pulumi’s CLI, yet. @white-balloon-205?
t
was just looking at your github app, seems to be doing something similar to what I was wanting (shows changes etc.) but I think thats closed source?
w
There is JSON output for several commands, and @bitter-oil-46081 is working on adding more this milestone. That will provide a programmatic “api” to the CLI which can be invoked from any environment. We may in the future add language-specific SDKs to wrap that - but near term focus is on a programmatically scriptable CLI.
b
was just looking at your github app, seems to be doing something similar to what I was wanting (shows changes etc.) but I think thats closed source?
Lame as it is, right now the GH app works by just `sed`'ing the output. When we add JSON output to
update
and
preview
the current thinking is you'll get a stream JSON objects that represent events the engine is creating, and one of them will be a summary event that happens at the end of a preview or update.
t
sounds great
any ETA?
b
Note that you can also do
pulumi stack output
to get the full contents of the stack in JSON form (the resources, etc). I realize this isn't the same as the event stream, but may be useful depending on what you're looking to do.
t
thanks Joe, will give that a try
I think its quite an important feature for gitops type workflows
👍 1
b
any ETA?
Plan is to complete it by thanksgiving (when the current milestone ends).