Reputation: 33
I create a Spring Boot App like this (https://www.youtube.com/watch?v=qx_T6-EKkBE) and deploy it in App Engine - Google Cloud
Also i create a SQL Server instance like this (https://www.youtube.com/watch?v=vMUpNoukwnM) in Google Cloud
My question is: How i can connect my App Engine to my SQL Server Database? All the tutorials of the web is for MySQL or Postgress
I need to know how configure my springboot proyect (application.properties or whatever) with the connections parameteres of my SQL Server instance
Thanks
Upvotes: 0
Views: 164
Reputation: 75775
AFAIK, you can't because the SQL server driver aren't compliant with Unix socket that is created automatically when you configure a CLoud SQL instance into app.yaml file.
You could connect your database directly by the private IP. For this, you could configure a private IP for your SQL server instance. Then, you could use serverless VPC access component to connect your AppEngine instance to your VPC and access to your SQL Server with the private IP in your VPC.
However, I tried this with Cloud Function and it didn't work. By discussing with Google, there is an open issue for communicating between the Serverless VPC Access and the SQL server private IP.
The last solution is to grant 0.0.0.0/0
on the public IP of your SQL server instance for letting App Engine reaching it as a public resource. But it's a very bad practice to open the IP of your database on internet...
Things will change. Stay tuned
Upvotes: 3