question

dpaisig-6233 avatar image
0 Votes"
dpaisig-6233 asked KalyanChanumolu-MSFT answered

Web apps see Azure SQL in another Resource Group

In an example,
I have Resource Group A that has Azure SQL 1 and Web App 1.
I have Resource Group B that has Azure SQL 2 and Web App 2.

Can Azure SQL 1 see/do queries in Azure SQL 2?
Can Web App 1 call database Azure SQL 2?

In another words, is Resource Group a way to organize the work, but does not put up walls from one to another?
I was planning on creating a Resource Group DEV, QA and UAT. But a database is required to be used in all 3 environments.

My thoughts it having this database in another resource group and DEV/QA/UAT web apps access it when it needs.

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KalyanChanumolu-MSFT avatar image
0 Votes"
KalyanChanumolu-MSFT answered

@dpaisig-6233 Thank you for reaching out.

Resource groups help you organize your resources better. Think of them as a logical grouping for Azure Resources.
They don't restrict connectivity between resources.

Can Azure SQL 1 see/do queries in Azure SQL 2?

Yes, you can use Elastic queries to run query across Azure SQL Databases.

Can Web App 1 call database Azure SQL 2?

Yes, Web apps connect to the database using a connection string. A tutorial is here
You can connect to the database even if they are not in the same resource group.

You can have your different webapps in different resource groups, but they can all share a database in another resource group.
Please let us know if you have further questions.


If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.