Azure has changed a fair bit from a year ago when I played with it.
I have a web app, and a Sql DB in my Azure resource group. I want my web app to read from my DB. I made a firewall rule so that my app can read from the DB at my workstation (running locally), and that is fine. But I want my app to read from the DB when it is deployed.
Do I just make a sql firewall rule to allow the app's IP address when hosted through to the DB? Or is there a way I can tell azure that the web app, and the DB in the same resource group,and it is a secure connection? Perhaps that they could communicate with each other on an internal connection?
I think in the old Azure you could 'link' an app and a DB and it accomplished this. But not sure what the procedure is in the updated Azure.
Choosing the "Allow access to Azure services" option will allow the app service to connect to the MySQL server. On the MySQL server blade, under the Settings heading, click Connection Security to open the Connection Security blade for Azure Database for MySQL. Select ON in Allow access to Azure services, then Save.
App access to SQL Database serverYou can configure Power Apps access to Azure SQL Database server using the Azure portal, or stored procedure sp_set_firewall_rule. To configure access using the Azure portal, sign in to the Azure portal, and go to your SQL Server.
Go to your Azure SQL Database and get a copy of the connection string. (It won't have your password, so you'll have to add that in a minute.
Next, go to your Web App, click on the "All Settings" and under then click "Application Settings".
Scroll down to "Connection Strings" and either create a new connection string (and paste it in from the first step) or update the existing connection string. Be sure to update the password in your connection string.
If you create a new connection string, make sure it's the same name as that one you are referencing in your code or you will have to change your code and redeploy as that as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With