如何为 Firebase 云功能设置 vpc 连接器?

2024-05-29

Firebase Cloud Functions 在 GCP 之上运行,因此,它们是否支持使用专有网络连接器 https://cloud.google.com/functions/docs/connecting-vpc?

我想要实现的目标是限制转发代理服务器仅接受来自内部网络的请求,但由于 Cloud Functions 不支持静态 IP,唯一的方法是通过 vpc 连接器。


现在似乎已在最新的 firebase-tools v8.9.0 版本中处理此问题。

必须与 firebase-functions v3.11.0 或更高版本结合使用

https://github.com/firebase/firebase-tools/releases/tag/v8.9.0 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);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何为 Firebase 云功能设置 vpc 连接器? 的相关文章

随机推荐