Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup vpc connector for firebase cloud functions?

Firebase Cloud Functions run on top of GCP, so, do they support using a vpc connector?

What I'm trying to achieve is to limit a forward-proxy server to only accept requests from the internal network, but since Cloud Functions doesn't support static IPs, the only way would be via vpc connector.

like image 390
Jonathan Solorzano Avatar asked Apr 24 '19 07:04

Jonathan Solorzano


1 Answers

This seems now to be handled in latest firebase-tools v8.9.0 version.

Must be used in conjunction with firebase-functions v3.11.0 or higher

https://github.com/firebase/firebase-tools/releases/tag/v8.9.0

functions
  .runWith({
    vpcConnector: 'test-connector',
    vpcConnectorEgressSettings: 'PRIVATE_RANGES_ONLY'
  })
  .auth.user()
  .onCreate((user) => user);
like image 102
GuillaumeGustin Avatar answered Sep 22 '22 02:09

GuillaumeGustin