Search code examples
azureasp.net-coregoogle-cloud-platformgoogle-cloud-sqlazure-web-app-service

How to connect Azure App Service Web App to Google SQL Server Database?


Due to what is happening right now in the world, azure seems to have run out of space. Currently, you cannot create a new SQL Server therefor no SQL Databases. Does anyone have experience or knowledge on how to Connect the Web App hosted on Azure to the GoogleSQL SQL Server? It's the only viable cloud service I found that can be free for some time until azure is back online. I cant figure out how to get the connection strings and how to allow connections etc. There is minimal documentation on SQL Server from googles side.

Thank you in advance, Mike


Solution

  • For connect to Cloud SQL you need to enable the Public IP of your database and whitelist the Public IP of your Azure app to Allow connections between Azure app and Cloud SQL

    The only way to connect to Cloud SQL from the external services is via IP connection in this document is explained step by step how to enable Public IP for your SQL server and how to whitelist the incoming IP addresses.

    I found this article about how to create a connection string using public IP