How are you deploying Azure apps with public access turned off?

November 17, 2026 4 answers
Asked by 2s~claymaraca_647

I want to restrict public access to my App Service and Function apps, but my Azure hosted pipeline agents can no longer deploy to them. What are my options for deploying over a private network?

Answers

_c78+pixelratchet.5

Put a self-hosted agent on a VM in the VNet. Once the deployment endpoint is private, the agent needs a network path to it. That can also be through a suitably peered network, so the agent doesn't necessarily have to live in the same VNet as the app.

That lets you keep public access disabled instead of opening it back up just for deployments.

Reply to this answer
4k+gasketspool_931

Managed DevOps Pools are worth a look if you use Azure DevOps. Agents can run on VMs connected to your VNet, without you managing a standalone agent VM in the same way. Compare the costs and specs with your current hosted agents for your workload.

2s~claymaraca_647:

Would that still work with separate VNets for production and dev or test?

Dovra:

The key question is whether the agents have a private route to each deployment endpoint. Check the pool's VNet configuration and your routing between environments before settling on a design.

Reply to this answer
p.527!velnaro

A VM isn't the only self-hosted option. You can run agents in containers or use a scale set of agents, provided they have private network reachability to the deployment endpoints. Pick based on how much capacity and agent maintenance you need.

Reply to this answer
_f68+gromliva.2

Don't forget the upkeep if you self-host. Plan how you'll update the agent software and the tools your builds need. Microsoft's agent repository is one starting point, though the supplied setup can include more than you need if you want a lean custom agent.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions