Is there anyway I can connect the Cloud Functions with a VPC connector on default network to a GCE instance with multiple network interfaces where nic0 is someother network and nic1 is default network?
So I have a GCE instance with multiple network interfaces.
nic0 is someother network
nic1 is default network
I made a serverless VPC connector on default network. And used that connector with Google Cloud functions to connect to the GCE instance.
The problem is that when network interfaces are swapped i.e. nic0 is default network and nic1 is someother network, then VPC connector connects successfully and cloud functions can reach the GCE but when nic0 is someother network and nic1 is default network then cloud functions cannot reach GCE.
I tried the following things:
- I tried swapping the network interfaces i.e. default to nic0 and it works but i need nic0 for someother network to connect to another external server and so default is on nic1.
- I tried making firewall rules but apparently they are not needed in this scenario as I already have the necessary rules setup.
- I tried making a VPC connector on the someother network so it could connect to nic0 but that does not work too. VPC connector should be on default network.
Note: I have the correct IAM permissions setup as I've successfully connected Cloud functions to GCE instance with only default network.