Design and Implement an MLOps Infrastructure · Topic 4 of 4

Network Isolation and Git Source Control

AI-300 MLOps: restrict network access to a Machine Learning workspace with private endpoints and managed networks, and manage ML projects with Git.

  • 4 min
In a nutshell
  • Private endpoint plus disabled public access restricts inbound access.
  • Isolation modes: disabled, allow internet outbound, allow only approved outbound.
  • Outbound rule types: private endpoint, service tag, FQDN.

What it is

By default a workspace is reachable over the public internet (with Microsoft Entra authentication). Two controls restrict it: a private endpoint that gives the workspace a private IP in your virtual network, and a managed virtual network that Azure creates to isolate compute. Separately, Git keeps code, pipeline definitions and infrastructure under version control so every change is reviewed and reversible.

Client in your VNetPrivate endpointworkspaceWorkspacepublic access disabledManaged VNetisolates computeStorage, Key Vault, registryprivate endpoints

How it works

Block public access

Set public network access to disabled and create a private endpoint for the workspace (sub resource amlworkspace). Clients then reach the studio, SDK and CLI only from networks that can resolve and route to the private IP.

# workspace.yml (fragment)
name: mlw-prod
location: eastus
public_network_access: disabled

Private DNS must resolve the workspace names to the private IP. The relevant private DNS zones are privatelink.api.azureml.ms and privatelink.notebooks.azure.net. If DNS still returns a public IP, the private endpoint is bypassed, which is the most common cause of "cannot reach the workspace" in this setup. A private endpoint only covers data plane access: management operations such as creating compute still use the public Azure control plane. With private dependencies, image builds cannot use Container Registry tasks, so set image_build_compute to a compute cluster.

Managed virtual network

A workspace managed virtual network is created and run by Azure Machine Learning, and compute instances, clusters, serverless jobs and managed online endpoints can run inside it. You pick an isolation mode.

Isolation modeOutbound traffic
DisabledNo managed network
Allow internet outboundCompute can reach the internet; private endpoints are used for your Azure resources
Allow only approved outboundOnly destinations you add as outbound rules are reachable
managed_network:
  isolation_mode: allow_only_approved_outbound

Outbound rules are of three kinds: private endpoint (to your storage, Key Vault, Azure AI Search and so on), service tag and FQDN. The managed network is provisioned when the first compute is created, or earlier with az ml workspace provision-network. For maximum control (for example to stop data exfiltration), use allow only approved outbound.

Related controls

  • Give the dependent storage account, Key Vault and container registry private endpoints as well, otherwise jobs cannot reach them.
  • Online endpoints have their own public_network_access setting. Set it to disabled to accept only private traffic.
  • Clusters in your own virtual network use enable_node_public_ip: false so nodes have no public IP.
  • Azure Policy can require private networking so new workspaces cannot be created without it.

Git for machine learning projects

A typical repository layout:

repo/
  infra/            Bicep templates
  src/              training and scoring code
  components/       component YAML
  jobs/             job and pipeline YAML
  notebooks/        exploration (outputs cleared)
  .github/workflows/
PracticeWhy
Feature branches and pull requestsPeer review, and workflows run checks before merge
Protected main branchOnly reviewed, passing changes reach production
.gitignore for data, models and secretsLarge data lives in data assets, models in the registry, secrets in Key Vault
Clear notebook outputs before commitSmaller diffs, and no sensitive data pasted into output cells
Tags or releasesMark exactly which code produced which model

Jobs submitted from a Git working directory record the repository, branch and commit with the run, which links a model back to the code that trained it.

A worked example

A bank requires that no ML traffic crosses the internet. The team disables public access on the workspace, adds private endpoints for the workspace, storage, Key Vault and registry, sets the managed network to allow only approved outbound, and adds one FQDN rule for the Python package mirror they use. Code changes flow through pull requests into a protected main branch.

How the exam asks about this

  • "The workspace must not be reachable from the internet." Disable public network access and use a private endpoint.
  • "Compute may reach only listed destinations." Managed network with allow only approved outbound and outbound rules.
  • "Show which code produced a registered model." Run from Git so the commit is recorded with the job.

What to remember for the exam

  • Private endpoint plus disabled public access restricts inbound access.
  • Isolation modes: disabled, allow internet outbound, allow only approved outbound.
  • Outbound rule types: private endpoint, service tag, FQDN.
  • Dependent resources need private endpoints too, and private DNS must resolve correctly.
  • Never commit data, models or secrets to Git.
Watch out

Disabling public access without private DNS in place locks you out. Test name resolution from inside the network first.

Common mistakes

Securing only the workspace. The storage account and Key Vault stay public unless they get private endpoints.

Choosing "allow internet outbound" for a strict requirement. That mode permits internet traffic. Use approved outbound only.

Committing a data file "just once". It stays in Git history. Register data as a data asset instead.

Check yourself

  • Which setting stops internet access to the workspace?

    Disable public network access and use a private endpoint.

  • Which isolation mode limits outbound traffic to approved destinations?

    Allow only approved outbound.

  • What links a registered model to its training code?

    The repository, branch and commit recorded when the job runs from Git.

Topic 4 of 4 in Design and Implement an MLOps Infrastructure

Test yourself on Design and Implement an MLOps Infrastructure

The full Microsoft AI-300 question bank has 650 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.