Search code examples
google-cloud-platformgoogle-cloud-rungoogle-vpc

Cloud Run error: VPC connector "connector" is not ready yet or does not exist


So I am trying to connect my Cloud Run service (only in region us-west1) with my VPC connector (region us-central1), when i try to update my already existing service using this command

gcloud run services update SERVICE --vpc-connector CONNECTOR_NAME 

I got this error:

Cloud Run error: VPC connector 'connector's name' is not ready yet or does not exist.

NOTE: I cannot deploy my connector in region us-west1 (is not a given option from GCP), so the service and the connector are in the same region.

Any advice how do I solve this?


Solution

  • As you can see in this Official Documentation for VPC Connectors:

    A connector must be located in the same project and region as the serverless service that connects to it.

    So, in order to fix the issue you are facing you have to change the connector to the same region that your service is located, since the region your service is located does not support VPC Connectors, you will also have to change your service to a new region in order to use a VPC Connector with it before that. You can find the regions available for VPC Connectors in here.