简体   繁体   English

使用 SharedVPC 时无法创建无服务器 VPC 访问连接器

[英]Unable to create Serverless VPC Access Connector when using SharedVPC

Background:背景:

  • I have a Shared VPC project called SharedVPC with a.network network01 and a su.net serverless-su.net01: 10.200.12.0/28我有一个名为SharedVPC的共享 VPC 项目,带有 a.network network01和 su.net serverless serverless-su.net01: 10.200.12.0/28
  • The Shared VPC Project shares its.networks and su.nets with another project project1 Shared VPC Project 与另一个项目project1共享 its.networks 和 su.nets
  • Nothing else is using serverless-su.net01没有别的东西在使用serverless-su.net01
  • All resources in both projects are in us-central1两个项目中的所有资源都在us-central1
  • I have the owner role in both projects我在两个项目中都有owner角色
  • vpcaccess.googleapis.com is enabled in project1 vpcaccess.googleapis.comproject1中启用

The issue:问题:

I want to create a Serverless VPC Access Connector in project1 using network01 and serverless-su.net01 , but when trying to follow the documentation to create a connector, the following error occurs after clicking "create" with us-central1 as the region, network01 as the.network, and serverless-su.net01 as the su.net:我想使用network01serverless-su.net01project1中创建无服务器 VPC 访问连接器,但是当尝试按照文档创建连接器时,在单击“创建”并使用us-central1作为区域network01后出现以下错误作为.network,serverless serverless-su.net01作为su.net:

Operation failed: VPC Access did not have permission to resolve the subnet or the provided subnet does not exist.

I have attempted to apply the troubleshooting steps in the documentation, with the following results:我尝试应用文档中的故障排除步骤,结果如下:

  1. There is no such account with a name like service-PROJECT_NUMBER@gcp-sa-vpcaccess.iam.gserviceaccount.com or the role of roles/vpcaccess.serviceAgent in either project1 or SharedVPC Edit: there is an account in SharedVPC with the name service-SharedVPC_PROJECT_NUMBER@gcp-sa-vpcaccess.iam.gserviceaccount.com , but it is only visible through gcloud commands and adding the appropriate roles to it does not fix the issue.project1SharedVPC编辑中没有名称为service-PROJECT_NUMBER@gcp-sa-vpcaccess.iam.gserviceaccount.comroles/vpcaccess.serviceAgent的帐户 编辑: SharedVPC中有一个名为service-SharedVPC_PROJECT_NUMBER@gcp-sa-vpcaccess.iam.gserviceaccount.com的帐户service-SharedVPC_PROJECT_NUMBER@gcp-sa-vpcaccess.iam.gserviceaccount.com ,但它只能通过 gcloud 命令可见,并且向其添加适当的角色并不能解决问题。
  2. No.network overlaps with serverless-su.net-01 , No.network 与serverless-su.net-01重叠,
  3. There are no firewall rules with a priority over 1000 that denies ingress没有优先级超过 1000 的防火墙规则拒绝进入

The solution was that there was a vpc access service account for project1 , but it was only visible through gcloud commands rather than the console.解决方案是project1有一个 vpc 访问服务帐户,但它只能通过 gcloud 命令而不是控制台可见。 This account needs the roles/vpcaccess.serviceAgent role in the shared vpc project in order to access the su.net.此帐户需要共享 vpc 项目中的roles/vpcaccess.serviceAgent角色才能访问 su.net。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无服务器 VPC 访问连接器状态不佳 - Serverless VPC access connector is in a bad shape 使用无服务器 VPC 连接器连接到 Cloud Run 服务时出现 403 - Getting 403 when connecting to a Cloud Run service when using a Serverless VPC Connector 如何使用无服务器 vpc 连接器启用 Cloud Run 以仅将流量限制到特定 VPC 资源 - How to enable Cloud Run using serverless vpc connector to restrict traffic to a specific VPC resource only 使用 Google Serverless VPC 访问具有云功能的 GKE pod - Access GKE pods with Cloud functions using Google Serverless VPC 关于创建 VPC 访问连接器的困惑 - Confusion Around Creating a VPC Access Connector VPC 访问连接器无法正常运行 - VPC Access connector failed to get healthy 使用私有 IP 和无服务器 VPC 访问从 App Engine 到 CloudSQL 的连接问题 - Connectivity issues from App Engine to CloudSQL using Private IP and Serverless VPC Access 在 Cloud Run 中使用 VPC 连接器 - Using VPC connector in Cloud Run terraform import google_vpc_access_connector.default 抛出“错误:未知资源类型:google_vpc_access_connector” - terraform import google_vpc_access_connector.default throws "Error: unknown resource type: google_vpc_access_connector" 如何使用 AWS CloudFormation 创建 Amazon VPC? - How to create an Amazon VPC using AWS CloudFormation?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM