access to database without a need for Authorized networks in cloud sql

153 views Asked by At

i made a java application that anybody can use it from different location, i want to every user to have the access to the database in the cloud sql , my question is how can i access to the database without a need for Authorized networks

1

There are 1 answers

0
John Hanley On

Security Warning: Do not allow the Internet to access Cloud SQL.

Your question states without a need for Authorized networks. If that is a requirement, then you must implement a server to proxy requests for Cloud SQL. That server will need to use the Cloud SQL Auth Proxy or have access via private IP.

About the Cloud SQL Auth proxy

To allow public Internet access, use the address range 0.0.0.0/0. This means adding that value as an authorized network.

Authorizing with authorized networks

You can also use the CLI:

gcloud sql instances patch INSTANCE --authorized-networks=0.0.0.0/0

gcloud sql instances patch