Hi @PJL
If you have SQL managed instance on the VNET B and VPN Gateway installed in VNET A, you should peer VNET A and VNET B.
Connecting an application when it resides within a different virtual network from SQL Managed Instance is a bit more complex because SQL Managed Instance has private IP addresses in its own virtual network.
Whatever choice you make, you can connect it to Azure SQL Managed Instance.
Another scenario implemented by customers is where a VPN gateway is installed in a separate virtual network and subscription from the one hosting SQL Managed Instance. The two virtual networks are then peered. The following sample architecture diagram shows how this can be implemented.
VPN gateway can see the IP addresses in the virtual network that hosts SQL Managed Instance. To do so, make the following very specific changes under the Peering settings.
- In the virtual network that hosts the VPN gateway, go to Peerings, go to the peered virtual network connection for SQL Managed Instance, and then click Allow Gateway Transit.
- In the virtual network that hosts SQL Managed Instance, go to Peerings, go to the peered virtual network connection for the VPN gateway, and then click Use remote gateways.
Refer-
https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/connect-application-instance
If the Answer is helpful, please click Accept Answer
and up-vote, this can be beneficial to other community members.