crazy question folks: Is the SDK completely couple...
# general
f
crazy question folks: Is the SDK completely coupled to the CLI? or would i theoretically be able to execute stack operations in the context of another node.js application?
g
The SDK and CLI are currently coupled, so you cannot run Pulumi from within another node application.
Someone else on the team can articulate it better than me, but the Pulumi "engine" in the CLI is critical to the execution of a Pulumi app.
We are exploring ways/ideas of enabling Pulumi to be embedded in other applications, but (I believe) this would be via Golang and isn't a near-term effort.
w
Currently the SDK is coupled to the Pulumi engine, which is loaded from the
pulumi
CLI. The best way today to automate stack operations is to shell out to the
pulumi
CLI. You can of course do that from any language you want. Many CLI commands accept
--json
parameter to provide their results as machine-readable JSON so they can be processed from code. We are looking at options to allow driving deployments directly via the JS/Python/Go SDKs. But our immediate focus is on enabling the CLI to be easily invoked programmatically - as this unlocks the full flexibility of the existing CLI and engine from any language ecosystem (albeit with a little more ceremony).
f
great thanks. that's very helpful!
has there been any prior interest in this use case?
w
Yes - this has come up a lot. We’re thinking a lot about ways to streamline this further.
f
are there any discussion/planning issues on gh i can follow/participate in?
g
@fast-motherboard-21624 I believe https://github.com/pulumi/pulumi/issues/2506 is the best issue to subscribe to.