https://pulumi.com logo
#golang
Title
# golang
m

magnificent-baker-63834

07/16/2020, 7:40 AM
Can anyone tell me if it's possible to use Pulumi within a Go application without having to use the
pulumi
cli commands? I'd like to use it as part of a larger application but can't seem to find any documentation on how or even if it's possible.
g

gentle-diamond-70147

07/16/2020, 7:50 AM
It's not currently possible, but something we're hoping to enable soon! Please follow https://github.com/pulumi/pulumi/issues/3901 and add any additional context on your use case there.
In the meantime you could wrap the
pulumi
cli in your application, but the issue I linked is focused on making this a first-class programmatic interface.
m

magnificent-baker-63834

07/16/2020, 7:51 AM
Ah, that's a shame. It's the sole reason we looked at using Pulumi over Terraform. 😞
Is the CLI output machine-readable enough for that to be reliable? We're looking at building a service that'll manage Kubernetes clusters and underlying infrastructure for many, many teams over as many different AWS accounts so needs to be able to handle failures.
g

gentle-diamond-70147

07/16/2020, 7:54 AM
The resulting state file from a
preview
or
up
is machine-readable as JSON so could certainly be handled programmatically.
We have several customers doing a similar "managed service" type solution so we'd be happy to talk to you about this in more detail if you're interested. If so, please send an email to support@pulumi.com and I can help setup a call.
💯 1
m

magnificent-baker-63834

07/16/2020, 7:56 AM
Thanks!
b

boundless-island-27202

07/16/2020, 3:16 PM
huge +1 to this, I assumed this was already in place too considering you have a programmatic model.
l

lemon-agent-27707

08/29/2020, 3:41 PM
Just wanted to follow up and mention that we merged the first PR for the Automation API Go SDK! https://github.com/pulumi/pulumi/pull/4977 It's in alpha and there will be (mostly additive) breaking changes in the coming weeks. There are complete godocs here that you can check out: https://godoc.org/github.com/pulumi/pulumi/sdk/go/x/auto In addition, there are still a bunch of holes that we'll be plugging over the next few weeks. Here's a list of known issues that we're tracking: https://github.com/pulumi/pulumi/issues?q=is%3Aissue+is%3Aopen+label%3Aarea%2Fautomation-api If you'd like to try it out, you'll need to build pulumi/pulumi as there are CLI changes. We'll cut a CLI release early next week that will make it easier to try all of this out. I'll be updating https://github.com/pulumi/pulumi/issues/3901 with instructions and a call for feedback early next week, but I thought I'd let ya'll know in the mean time in case you're eager to kick the tires. If the feedback on the design is positive, we'll follow up with all of the supported pulumi languages.
3 Views