https://pulumi.com logo
Title
r

red-energy-90711

09/24/2020, 3:05 PM
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

lemon-agent-27707

09/24/2020, 3:09 PM
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

red-energy-90711

09/24/2020, 3:14 PM
Thanks, What language are supported? typescript? or just Go. Do you have any example that you could share. Regards
l

lemon-agent-27707

09/24/2020, 4:35 PM
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

red-energy-90711

09/24/2020, 5:05 PM
Thanks!. let me check
g

gifted-student-18589

09/25/2020, 3:50 PM
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

lemon-agent-27707

09/25/2020, 3:55 PM
😛artypus-8bit: hopefully I'll have some new to share on node support in the next few weeks! 😛artypus-8bit:
🚀 1
g

gifted-student-18589

09/26/2020, 5:10 AM
sounds great @lemon-agent-27707
p

proud-pizza-80589

09/26/2020, 8:30 PM
@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

gifted-student-18589

09/27/2020, 4:00 PM
will do @proud-pizza-80589, I have to finish it tomorrow/tuesday, so once it’s ready, I’ll share the link
p

proud-pizza-80589

09/27/2020, 4:09 PM
thx
g

gifted-student-18589

10/08/2020, 6:01 AM
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

proud-pizza-80589

10/08/2020, 9:26 AM
looking sharp!
🍻 1