Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Deploying Firebase app with Github Action remove vpc connector setting

Please help me.
We set up firebase hosting, functions, firestore for application.
It uses cloud sql on private vpc network.
First, we set up vpc connector on Cloud Functions and it works.
But we noticed that when we deploy it via Github Action, the connector setting is removed.
How to keep it or set it by deploy command?

```
#.github/workflow/deploy.yml
...

run: firebase deploy --project=my_project
```
Solved Solved
0 2 356
1 ACCEPTED SOLUTION

for a cloud function you would add --vpc-connector to the gcloud command gcloud functions deploy  |  Google Cloud CLI Documentation for firebase an issue was raised Cloud Function and a Serverless VPC Access connector must be located in the same region. · Issue #47... and you need to add a function to pass the connector parameters like

 

export const testFunction = functions
  .runWith({
    timeoutSeconds: 540,
    memory: '8GB',
    vpcConnector: 'our-vpc-connector',
    vpcConnectorEgressSettings: 'PRIVATE_RANGES_ONLY',
  })
  .pubsub.topic('our-topic')
  .onPublish(async (msg: any, _context: any) => {
    // function contents
  });

 

 

View solution in original post

2 REPLIES 2

for a cloud function you would add --vpc-connector to the gcloud command gcloud functions deploy  |  Google Cloud CLI Documentation for firebase an issue was raised Cloud Function and a Serverless VPC Access connector must be located in the same region. · Issue #47... and you need to add a function to pass the connector parameters like

 

export const testFunction = functions
  .runWith({
    timeoutSeconds: 540,
    memory: '8GB',
    vpcConnector: 'our-vpc-connector',
    vpcConnectorEgressSettings: 'PRIVATE_RANGES_ONLY',
  })
  .pubsub.topic('our-topic')
  .onPublish(async (msg: any, _context: any) => {
    // function contents
  });

 

 

Thank you so much. We could resolve by adding your solution into nuxt.config.ts file.
Regards