Domain 1 of 5 · Chapter 3 of 3

Infrastructure as Code for Machine Learning

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing Operationalizing Machine Learning and Generative AI Solutions premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • Why Infrastructure as Code for Azure ML
  • Authenticate GitHub Actions to Azure with OIDC
  • Declare and deploy: Bicep, ARM JSON, and CLI v2
  • Automate the lifecycle with GitHub Actions
  • Restrict network access to the workspace
  • Exam-pattern recognition

Choosing an IaC or provisioning tool for Azure ML

AspectBicepARM JSONTerraformaz ml CLI v2
Language / formatAzure-native DSLARM template JSONHCL (third party)Azure ML YAML specs
Deploy commandaz deployment group createaz deployment group createterraform applyaz ml <asset> create
What it provisionsAny Azure resourceAny Azure resourceAzure plus other cloudsWorkspace-scoped AML assets
Best fitAzure-only, readable templatesLowest-level or generated outputOne toolchain across cloudsCompute, environments, jobs, endpoints

Decision tree

Multi-cloud or Terraform shop?YesTerraformmulti-cloud, HCLNoWorkspace-scoped assets?compute, jobs, endpointsYesaz ml CLI v2YAML specsNoConcise, readable template?Azure-only estateYesBicepAzure-native DSLNoARM JSONlower-level formAlways: sign in with OIDC federation, no stored secret

Cheat sheet

  • OIDC federated identity is the secure GitHub-to-Azure auth
  • azure/login with OIDC needs id-token write permission
  • Deploy the workspace resource type with Bicep
  • az ml (CLI v2) versus az deployment for provisioning
  • GitHub Actions workflows live in .github/workflows and are event-triggered
  • One workflow can chain provisioning, training, and deployment
  • Managed virtual network isolation modes
  • Private endpoints plus disabling public access lock down the workspace
  • Compute instances integrate Git and jobs capture Git lineage

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. Create a Workspace by Using an Azure Resource Manager Template - Azure Machine Learning
  2. Deployment modes - Azure Resource Manager
  3. Create a trust relationship between an app and an external identity provider - Microsoft Entra Workload ID
  4. Authenticate to Azure from GitHub Actions by OpenID Connect
  5. GitHub Actions for CI/CD - Azure Machine Learning
  6. What is Bicep? - Azure Resource Manager
  7. Create workspaces with Azure CLI - Azure Machine Learning
  8. Git integration - Azure Machine Learning
  9. Managed virtual network isolation - Azure Machine Learning
  10. Configure a private endpoint - Azure Machine Learning