Hi, with automation-api would be possible to run i...
# automation-api
r
Hi, with automation-api would be possible to run inside a serverless function like AWS lambda or Azure Functions. I mean receive args and then run the provisioning process without "pulumi up" command.
l
Yes, you should be able to do that. There will be some additional setup that's required such as making sure the
pulumi
executable is available on the lambda's path. It would probably be a good idea to mount EFS to the lambda so that the pulumi binary and any necessary plugins only get downloaded once.
r
Thanks, What language are supported? typescript? or just Go. Do you have any example that you could share. Regards
l
Automation API is available for Go right now. Typescript support is in progress, we have a rough draft PR but there's still a bunch of work left: https://github.com/pulumi/pulumi/pull/5347
👀 1
We don't have any prebuilt examples of running Automation API in lambda. But there are a bunch of example projects: • The examples repo: https://github.com/evanboyle/automation-api-examples • Extensive documentation and examples in the godocs: https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v2/go/x/auto
r
Thanks!. let me check
g
Can’t wait for the Automation API 🙂
I already had to create my own version, of let’s call it, Pulumi SDK. A simple JS class that executes
pulumi
binary with
execa
and that’s it. But having the official support for this, sounds awesome!
Will be following the #automation-api channel.
l
partypus 8bit hopefully I'll have some new to share on node support in the next few weeks! partypus 8bit
🚀 1
g
sounds great @lemon-agent-27707
p
@gifted-student-18589 care to share this class by any chance? Looking into the same thing until the automation framework for TS is done.
g
will do @proud-pizza-80589, I have to finish it tomorrow/tuesday, so once it’s ready, I’ll share the link
p
thx
g
I know it was a looong time ago, but just wanted to let you know I’ve managed to wrap it up. It’s still not released to NPM, but I still wanted to share it, just in case it still might be relevant to you (and if so, you could just c/p the code and use it). https://github.com/webiny/webiny-js/tree/feat/v5/pulumi-next/packages/pulumi-sdk But it seems the automation API might be rolling out soonish, we’ll most-probably be switching to that as soon it’s ready. @proud-pizza-80589
p
looking sharp!
🍻 1