Azure DevOps VNet integration - azure

We have an on-premises data centre that is connected to Azure via VPN.
There are some on-premises Jenkins jobs that need to run when code is pushed in the Azure repository, and there is an on-premises Nexus server to store artifacts from other Azure pipelines. The rest can and should run in Azure.
I know there is a possibility to use a self-hosted agent that is placed in the Azure virtual network which could then connect to on-premises, but we do not want to manage/pay for a self-hosted agent.
My question is, is there something like a virtual network integration for Azure DevOps? The idea is to let DevOps connect to on-premises resources via the Azure VNet and the VPN without self-hosted agents in between.
E.g., does the ARM Service Connection only allow to access resources like VMs for deployments or does it also allow to connect to a VNet and the via VPN connected resources on-premises?
Thanks in advance!
I have already created a service connection between DevOps and the Azure subscription. I cannot check weather the connection to on-premises works for internal reasons.

The Microsoft hosted agents for Azure DevOps only allow for public internet connections to other resources. VPN and Use of expressroute or other connections to the internal corporate network are not supported. See this section of the docs for reference.

Related

How can I restrict network access of Microsoft-hosted agents to my Azure subscription?

I have a hosted agent VM in a VNET in my Azure subscription that is supposed to do Bicep deployments to my Azure subscription. It is working well.
I am noticing that Microsoft-hosted agents also can deploy resources or do updates in my Azure subscription once they have a valid service connection. The same pipeline can run on both Self-hosted VM agents or Microsoft-hosted agents. This is a concern for our security department. The preference is that no external entity (outside a designated VNET in the subscription) should be able to access the subscription. We want to establish network isolation between subscription and external access, whether a valid service connection is available or not.
If you have private agent you can limit access to your resources by filtering IP address. I don't know your infrstracture so I cannot say preciesly but for App Services of Function App you could use scm restrictions to limits deployments just to your private agent.
You won't be able to establish that on subcription level, but you could try something different. If you host you agent on Azure (vritual machine or scale set), you could use Managed Identity, then you could use this instead of service connection (or try service connection with Managed Identity), and then using Service Connection outside of your agent become pointless.
Please check this tutorial for more details:
If you use the Managed Identity enabled on a (Windows) Virtual Machine in Azure you can only request an Azure AD bearer token from that Virtual Machine, unlike a Service Principal.

Deploy from Azure VM

I have site to site VPN from my Azure VM to an on premise network.
May I know how can I deploy the code on Azure VM such that the site to site network stays?
Just for the sake clarity lets reiterate that A Site-to-Site VPN gateway connection is used to connect your on-premises network to an Azure virtual network over an IPsec/IKE (IKEv1 or IKEv2) VPN tunnel.
After site-to-site VPN is operational, network on both sides of VPN would be treated as one virtual network. This enables cross network accessibility of network resources as defined in access configuration.
Your questions needs clarity as I do not believe "the code deployment to a VM" would interfere "the network configuration" where the VM is housed.
It would be helpful if you could you add details to your question like error etc, in the meantime adding few pointers to get you started on VM creation and deployment.
Create a Windows VM in the Azure portal
Deploy an ASP.NET app to an Azure VM using Visual Studio
Deploy your ASP.NET app to Azure VM by using Azure DevOps Starter

Azure logic app with AS2 connector through VPN

I am currently setting up an Azure logic app with an AS2 connector.
Now I am being asked to connect to the partner via VPN. From googling I think that is possible to somehow add the logic app to a VNET and then setup a site-to-site VPN gateway.
It is my first time to work with either Logic apps or AS2.
Question:
Is it possible to setup an Azure logic app with AS2 connector that connects through a VPN?
How might I do it?
Yes, it's possible.
First of all, you need to connect to Azure virtual networks from Azure Logic Apps by using an integration service environment (ISE), With ISE, you deploy the Logic Apps service into your virtual network.
When you create a logic app or integration account, select your ISE as their location. Your logic app or integration account can then directly access resources, such as virtual machines (VMs), servers, systems, and services, in your virtual network. This virtual network can be an existing VNet that has a VPN connection to the partner or you can select an Azure VNet as a peer for your environment.
You may note those prerequisites before your deploy ISE, and your ISE needs four empty subnets that aren't delegated to any service. You also can optionally set up NSGs by filtering network traffic across subnets.
Here is a detailed explanation in this blog--Introducing Azure Logic Apps Integration Service Environment (ISE).
For more references: https://learn.microsoft.com/en-us/azure/logic-apps/connect-virtual-network-vnet-isolated-environment-overview

Does webapps integrates with existing VMs on Azure?

I have an existing linux VM on Azure that has PHP + MySql legacy system running on it
I also have a Flask Webapp running under same Azure subscription
is it possible to the Python WebApp reach the existing MySql database running on Linux VM using the existing internal network ?
AB
It seems that you want to access MySql database on the Azure VM from Azure web app hosted in azure app service. If so, it's possible to integrate your app with an Azure Virtual Network.
You could have a quick start in that document, just note that there are two forms to the VNet Integration feature:
Reginal VNet integration. One version enables integration with VNets in the same region. Currently, this feature is still in preview but is supported for Windows app production workloads and Linux Web App for development and integration testing purposes. Read more details here.
Gateway required VNet Integration. The other version enables integration with VNets in other regions or with Classic VNets. This version requires the deployment of a Virtual Network Gateway into your VNet. It is only supported by Windows apps.
Additionally, Since VNet Integration is extended to use Azure container instance. For Linux web app, you could deploy it on Azure container instance in a VNet. See the template. This feature is currently in preview and you could know some limitations about deploying container instances into an Azure virtual network.
If your web app is hosting on other Azure services like Azure VM, you could use VNet to VNet connection or VNet peering or VPN connection to enable the communication between the two different virtual networks. Read more details here.
Hope this could help you.

Connecting to an on-premises SQL database from Azure WebJob

How do I connect to a database on-premises from an Azure WebJob or an Azure Function? Is this even possible?
I've been recently researching this and have found there a 3 avenues to connect app services to on prem database, as of today anyway.
Hybrid Connection, VNET Integration or App Service Environment
The later 2 options require VPN or Express (I think) connectivity to a cloud VNET. The VNET Integration option requires a separate VNET with PointToSite gateway connecting to your existing VNET. The App Service Environment is a quite expensive option as your App Service Plan is actually hosted inside your VNET, no longer being a shared host.

Resources