Search code examples
google-cloud-platformgoogle-cloud-sqlgoogle-cloud-run

Error while creating GCP Serverless VPC Connection ("code": 13)


Trying to create a serverless VPC connection but always getting the same error

ERROR: (gcloud.compute.networks.vpc-access.connectors.create) { "code": 13, "message": "An internal error occurred: Failed to create a VPC Access connector. Please delete the connector }

Have tried the following

  1. Reference Link: Serverless VPC Access
  2. Tried all steps in Troubleshooting - mentioned at the bottom of the above page
  3. Tried various IP ranges like 10.8.0.0, 10.128.0.0, 10.160.0.0 - no use
  4. Created a new project and tried to create the access there, same result
  5. Works if I change the region to us-central1 (instead of asia-south1). See below
gcloud compute networks vpc-access connectors create cloud-sql-connector \
    --network default \
    --region us-central1 \
    --range 10.8.0.0/28

Created connector [cloud-sql-connector]

gcloud compute networks vpc-access connectors describe cloud-sql-connector --region us-central1

ipCidrRange: 10.8.0.0/28
maxThroughput: 300
minThroughput: 200
name: projects/PROJECT_ID/locations/us-central1/connectors/cloud-sql-connector
network: default
state: READY
  1. Fails if try with asia/south1 (part of the supported regions as per the documentation)
gcloud compute networks vpc-access connectors create sql-connector \
    --network default \
    --region asia-south1 \
    --range 10.8.0.0/28

ERROR: (gcloud.compute.networks.vpc-access.connectors.create) {
  "code": 13,
  "message": "An internal error occurred: Failed to create a VPC Access connector. Please delete the connector manually."
}

Solution

  • There seems to be an ongoing issue with that specific region as it is out of capacity.

    When I try to create the connector using the Cloud Console instead of the relevant gcloud commands the asia-south1 region doesn't even show up.

    Notice that you are not the only user reporting this issue. I will recommend you to star and monitor the following Public Issue from GCP's Issue Tracker to get the most updated information from the relevant team.