'Unable to create Serverless VPC Access Connector when using SharedVPC
Background:
- I have a Shared VPC project called
SharedVPCwith a networknetwork01and a subnetserverless-subnet01: 10.200.12.0/28 - The Shared VPC Project shares its networks and subnets with another project
project1 - Nothing else is using
serverless-subnet01 - All resources in both projects are in
us-central1 - I have the
ownerrole in both projects vpcaccess.googleapis.comis enabled inproject1
The issue:
I want to create a Serverless VPC Access Connector in project1 using network01 and serverless-subnet01, 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-subnet01 as the subnet:
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:
There is no such account with a name likeEdit: there is an account in[email protected]or the role ofroles/vpcaccess.serviceAgentin eitherproject1orSharedVPCSharedVPCwith the nameservice-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.- No network overlaps with
serverless-subnet-01, - There are no firewall rules with a priority over 1000 that denies ingress
Solution 1:[1]
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. This account needs the roles/vpcaccess.serviceAgent role in the shared vpc project in order to access the subnet.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hope Church |
