Hi, I've been evaluating the product and love ever...
# general
i
Hi, I've been evaluating the product and love everything about it, but I'm struggling to see how I can fit my usecase around it. I want to build a simple Go app that when run, creates a S3 bucket using the Automation API. I want to be able to ship this utility to other people without asking them to also install and configure the Pulumi CLI. Is there any way this scenario is possible ?
b
codepipeline to run pulumi with an APIG-integrated lambda that can start the pipeline? end users would need to know how make API calls but that's probably a smaller ask than installing the pulumi CLI
s
Really -- if you are only making an S3 bucket, you might simply make direct calls to the AWS sdk directly. I lot less overhead. https://github.com/aws/aws-sdk-go
b
@important-belgium-68902 no, it's not possible, the automation API uses the Pulumi CLI, but your Go binary can handle and manage installing the Pulumi CLI and logging in for them. You can also use package dependencies to figure it out too, like
depends_on
in Homebrew @stocky-wire-60053 the problem with using the aws-sdk-go is that you have to use your own logic to decide if the bucket exists, it's imperative and so therefor you need a lot of control logic
s
"therefor you need a lot of control logic" ... maybe, but checking for bucket existence doesn't seem like much additional logic as opposed to the complexities of Pulumi in this case -- but I may be ignorant of an important detail.
i
I'll actually be provisioning a lot more than just a S3 bucket. I simplified it down to focus more on the main issue, which is the deployment and distribution story for apps using Automation API. I like @billowy-army-68599’s suggestion of installing the CLI through the Go app. I can use that as a starting point. Amazon CDK is a fallback option for me right now, but we want this to be a multicloud solution later on and didn't want to tie ourselves to AWS CDK from the start.
b
CDK doesn't support this sort of thing
b
So technically this is possible. However, it will require quite a bit of refactoring of pulumi code. We have an open issue for it: https://github.com/pulumi/pulumi/issues/7219
Note: this is only possible for Go programs, since Pulumi is written in Go. For other languages, this kind of integration would be significantly more difficult.
i
That's exactly the functionality I was looking for @bland-chef-60652. As jaxxstorm mentioned, CDK doesn't support the usecase I'm after either and I still have to use a CLI. Thanks for the help everyone, I have clarity on what my options are now.