Hi, does anyone have any examples of how to link a...
# google-cloud
d
Hi, does anyone have any examples of how to link an API to a function for google cloud? e.g. Create an endpoint and set the target function? I have done this in AWS using pulumi and was able to point each route to a lambda. Is the equivalent possible in GC? I cant see much in the docs or online about this. Thanks in advance.
w
Does this example do what you are looking for? https://github.com/pulumi/examples/tree/master/gcp-py-functions There are similar examples in that repo for other languages.
b
the example should work
d
Hmm not really what I meant but I also see what you mean. So I would like to be able to declare a function and then say this can only be accessed using a get request at this url. Kinda similar to this I guess - https://www.pulumi.com/docs/reference/pkg/gcp/cloudfunctions/function/
h
I think you need to make use of google cloud endpoints(similar to API gateway in AWS) and with google cloud functions ...it will be possible to achieve it in Pulumi as i see they have APIs for both
d
Thank you!! I missed that for some reason, looks like what Im after