1

Be warned, noob question here.

I want to play around with GCP AlloyDB. I have created a cluster and it has been assigned an internal IP. This is fine for applications running in the same VPC/ project network but I would love to connect to it directly from my workstation in the simplest way.

I am a total noob and don't even know what I don't know and would really appreciate any guidance on how to expose/map an internal IP to an external IP in GCP. Especially when I cannot pick the AlloyDB instance or internal IP when trying to reserve an external IP via GCP web console.

I'm thinking NAT and some router would do the trick but it's beyond my current knowledge and not even sure where to start searching.

cmptrwizard
  • 113
  • 2
  • GCP already assigns an internal [IP address](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address) and an external IP address. However, if you want to expose/access [externally](https://cloud.google.com/compute/docs/ip-addresses), it will be accessed by the external IP address. But first, you should configure your [firewall](https://cloud.google.com/iap/docs/using-tcp-forwarding) allowing the IP/IP ranges and the ports that you'll be using. – Bryan L May 16 '22 at 05:40

1 Answers1

0

The most straightforward way to achieve this is to connect your workstation's network to your VPC using Cloud VPN. You can read more about Cloud VPN and its various configuration options at https://cloud.google.com/network-connectivity/docs/vpn/concepts/overview.

AlloyDB uses private services access to allow connections from elsewhere in the VPC that you configure when you create an AlloyDB cluster. On-premises connections can be achieved with either Cloud VPN or Cloud Interconnect, but the latter is intended for long-term data center to cloud connections and is not particularly well-suited to the scenario you described. You can read more about private services access and on-premises connections at https://cloud.google.com/vpc/docs/private-services-access#on-premises-connectivity.

camb
  • 16
  • 1
  • Thanks @camb - also just noting here for others that AlloyDB will eventually have public IP option when it releases. – cmptrwizard Jun 07 '22 at 06:40