Shivani Gandhi
Shivani Gandhi

Reputation: 11

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

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

Steps Followed:

  1. Created a new Project la-gcp-cloud-run-demo
  2. Created a subnet in the network with CIDR range 10.8.0.0/28
  3. Created a VPC Connector using the subnet 10.8.0.0/28

Note : While creating the same Connector on la-gcp-cloud-run-demo, On other projects like la-gcp-corp an ls-gcp-test.

enter image description here

Upvotes: 1

Views: 2253

Answers (2)

Joanale273
Joanale273

Reputation: 1

this happened to me today i have to made an account with this format in the "host vpc" @cloudservices.gserviceaccount.com , you have to puto the account ID not the name, the account is in twelve digits. Give to this network user role.

Upvotes: 0

bhans
bhans

Reputation: 51

I've just recently encountered the same issue as yours. I am assuming that you are connecting the projects via Shared VPC.

You missed 2 steps from your original one:

Steps Followed:

1. Created a new Project la-gcp-cloud-run-demo
2. Created a subnet in the network with CIDR range 10.8.0.0/28
3. Created a VPC Connector using the subnet 10.8.0.0/28

4. Navigate to your target project and enable Serverless VPC API -- Once enabled, go to IAM Permissions and copy the freshly created gcp-sa-vpcaccess.iam.gserviceaccount 5. Go to your Shared VPC Host project and add your new gcp-sa-vpcaccess.iam.gserviceaccount under IAM add set the role as networkUser

Once you have the right permissions, you will be able to create Connectors without any problem.

Hoping this helps!

Upvotes: 2

Related Questions