GCP:使用无服务器 VPC 访问的功能是否也可以享受私有 Google 访问
GCP: Can Functions that use Serverless VPC Access also enjoy Private Google Access
我希望 GCP 上的 Cloud Function 连接到 Google API(例如,compute.googleapis.com
)私下。也就是说,不是通过互联网。我还希望此 Cloud Function 通过 Serverless VPC Accessor.
将 所有流量 出口到 VPC
要让 VM 私下连接到 Google API,请为 VM 所在的子网启用 Private Google Access。但是,对于 Functions,“无服务器连接器”本身并不是子网 ,因此无法为此连接器启用私有 Google 访问。使用私有 Google 访问,从函数发起的对 Google API 的调用最终将默认的互联网网关引向 public 互联网。
如何让我的函数在退出到我的 VPC 后私下调用 Google API?
当您处于 Google 网络中时,您永远不会为了获得 Google 服务而上网。最坏的情况,因为不在同一个区域,你进入Google全球光纤网络。
如果你在同一个地区,你就呆在里面。
因此,您的通话默认为私人通话。您没有 Google Cloud Functions 来强制执行此操作,这是默认设置。
但是,如果您想确定,可以像这样使用 private DNS of Google by adding private
:compute.private.googleapis.com
我希望 GCP 上的 Cloud Function 连接到 Google API(例如,compute.googleapis.com
)私下。也就是说,不是通过互联网。我还希望此 Cloud Function 通过 Serverless VPC Accessor.
要让 VM 私下连接到 Google API,请为 VM 所在的子网启用 Private Google Access。但是,对于 Functions,“无服务器连接器”本身并不是子网 ,因此无法为此连接器启用私有 Google 访问。使用私有 Google 访问,从函数发起的对 Google API 的调用最终将默认的互联网网关引向 public 互联网。
如何让我的函数在退出到我的 VPC 后私下调用 Google API?
当您处于 Google 网络中时,您永远不会为了获得 Google 服务而上网。最坏的情况,因为不在同一个区域,你进入Google全球光纤网络。
如果你在同一个地区,你就呆在里面。
因此,您的通话默认为私人通话。您没有 Google Cloud Functions 来强制执行此操作,这是默认设置。
但是,如果您想确定,可以像这样使用 private DNS of Google by adding private
:compute.private.googleapis.com