-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a serverless example #12
Conversation
49fe0e9
to
0fa3cad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!! One comment below.
}; | ||
|
||
// Serialize JavaScript callback to text | ||
let serializedFunction = pulumi.runtime.serializeFunction(handler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm torn. I don't think we want to encourage many people to call these directly. I wonder if, until we have a abstraction to do this -- I assume a gcp.serverless.Function overlay as you allude to (symmetric with how we layer this for AWS) -- if we should stick to assets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - this PR is a stepping stone toward a gcp.serverless.Function
. Next step will be to move this into that sort of overlay like in AWS and make the example use that instead.
Azure Functions example is now in! Would love to get this into examples for launch if possible, then we'll have serverless for all three providers. @swgillespie got a spare cycle to look into this? |
@joeduffy I'm sorry, I just saw this. It looks like we need to take a patch to our Terraform provider fork for this to work? |
0fa3cad
to
a077cb4
Compare
a077cb4
to
428bd0a
Compare
Adds an example highlight Bucket, BucketObject and Function resources. Uses `pulumi.runtime.serializeFunction` to generate the function from a JavaScript callback. Notably, the resulting function maintains a stable identity across code updates, by building on pulumi/terraform-provider-google#4. This is a first step toward a gcp-serverless library similar to aws-serverless.
And pick up latest `pulumi-master`.
428bd0a
to
355bb2f
Compare
Adds an example highlight Bucket, BucketObject and Function resources.
Uses
pulumi.runtime.serializeFunction
to generate the function from a JavaScript callback.Notably, the resulting function maintains a stable identity across code updates, by building on pulumi/terraform-provider-google#4.
This is a first step toward a gcp-serverless library similar to aws-serverless.