I want a Java Appengine Managed VM application to connect to a 2nd Gen Cloud SQL Instance. There are discrepancies in the documentation - I can't figure out if this is actually supported by Google or not!
https://cloud.google.com/appengine/docs/managed-vms/java/using-cloud-sql states:
4: In the console, grant your App Engine application access to the Google Cloud SQL instance.
But I see no way of doing this. In the Cloud SQL management console, under properties of an instance, there is:
Authorized applications: None
and seemingly no way to authorize applications?
Then on this page https://cloud.google.com/sql/docs/dev-access it states:
Java App Engine Applications
Using the Cloud SQL Proxy is not supported for Java.
So you seemingly cant use the Cloud SQL proxy. The only way I have got it all working is to open the SQL port to the world, so that the managed VM instances can connect to it on its public IP address, but that is a horrific solution!
Is there an actual supported way of doing this? Anyone from Google able to answer?