Web apps see Azure SQL in another Resource Group

dpaisig 161 Reputation points
2021-02-24T20:38:27.627+00:00

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
0 comments No comments
{count} votes

Accepted answer
  1. KalyanChanumolu-MSFT 8,316 Reputation points
    2021-02-25T06:50:08.99+00:00

    @dpaisig 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.

    0 comments No comments

0 additional answers

Sort by: Most helpful