I have an instance of NSQ running within a zone in google compute engine as part of a larger application.
As part of an automated testing effort, I'd like the ability to push events to this queue in our test environments. I would rather not expose this instance to the internet, and instead, create a google cloud function that acts as a facade. The cloud function can be installed at the project level, which is great since I don't want production to have this capability.
It seems that cloud functions are created at the region level and do not have access to zone local IP addresses. As a result, I can't figure out a way to post events to NSQ without exposing it to the public internet.
Is it possible to have a google cloud function communicate down to an instance running on gce without exposing that instance to the public internet?
To connect to an instance without an external IP address, use the gcloud compute ssh command with the --internal-ip flag. In the Google Cloud console, go to the VM Instances page and find the internal IP address for the instance that you want to connect to.
Compute Engine delivers configurable virtual machines running in Google's data centers with access to high-performance networking infrastructure and block storage solutions. App Engine is a fully managed, serverless platform for developing and hosting web applications at scale.
Investigating the matter I've found that this is not possible yet. Google Cloud Functions internal connectivity to Google Compute Engine has been already requested some months ago.1
In the public bug/issues database of Google it has been already said that it has been taken into consideration by google and that the Google engineering team is working on it 2. There is no ETA for the functionality though.
Sources: Google Groups question Public google issue/bug tracker
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With