The Simplest Way to Make Azure ML and Pulumi Work Like They Should
Using azure ml and pulumi together lets teams build machine learning workspaces with code. Pulumi sets up the cloud resources, and Azure ML runs the training jobs. Data scientists need fast compute clusters and safe storage accounts to train models. Platform teams want every resource tracked in version control from day one. When you pair these two tools, you stop clicking through cloud menus by hand. Instead, you write standard code that builds the exact same workspace every time. How roles a
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Using azure ml and pulumi together lets teams build machine learning workspaces with code. Pulumi sets up the cloud resources, and Azure ML runs the training jobs.
Data scientists need fast compute clusters and safe storage accounts to train models. Platform teams want every resource tracked in version control from day one. When you pair these two tools, you stop clicking through cloud menus by hand. Instead, you write standard code that builds the exact same workspace every time.
How roles and data flow between azure ml and pulumi
To make azure ml and pulumi work, you must link their identity systems. Pulumi needs a cloud identity with permission to create resource groups and workspaces. During a run, Pulumi reads your code and sends requests to the cloud API.
Azure ML needs its own managed identity to work with other cloud services. When Pulumi builds the workspace, it also creates a storage account and key vault. Pulumi then grants the workspace identity the right roles on those new resources.
Data flows along two separate paths once the setup finishes. Control data moves from your build pipeline through Pulumi to the cloud API. Training data moves straight from your storage account into the Azure ML compute nodes. Keeping these two paths separate makes your system much easier to guard and audit.
Common failure modes and how to scope roles
Many teams fail because they give Pulumi one huge admin key for everything. A shared service account with broad permissions creates a major risk for your company. If someone steals that key, they can delete workspaces or read private training data.
Another common bug happens when teams mix manual portal edits with code runs. A data scientist might change a compute size by hand in the web portal. The next time Pulumi runs, it overwrites that manual change and breaks the job. Unlogged queries to the workspace or storage accounts also leave security teams blind.
Azure RBAC + Pulumi Policy as Code: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix these issues by scoping roles down to the bare minimum. Give your Pulumi runner a role that only acts on one resource group. Use short-lived federated tokens in your build pipeline instead of static client secrets. Lock down network paths so compute nodes only talk to approved storage accounts. Put the workspace inside a private virtual network and block public internet traffic.
Keeping state and workspace updates clean
Machine learning workspaces have two kinds of resources with very different life cycles. Core items like networks, storage, and the base workspace rarely change after day one. Dynamic items like training jobs, models, and endpoints change many times every day.
Do not manage every single model run inside your main Pulumi state file. Let Pulumi build the base workspace, the compute clusters, and the role assignments. Let your data science pipelines register models and trigger jobs inside that ready workspace. This split keeps your state file small and prevents lock fights between teams. It also lets engineers update model code without needing permission to change cloud networks.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Should Pulumi manage individual machine learning training runs?
No, Pulumi should only build the workspace, networks, storage, and compute clusters. Use your machine learning pipelines or SDK scripts to start daily training runs.
How do we stop manual changes in the cloud portal?
Give users read-only roles in the portal so they cannot edit resources by hand. Route all workspace changes through your code review and build pipeline instead.
What is the safest way for Pulumi to log in to Azure?
Use OpenID Connect federation between your build pipeline and your cloud identity provider. This setup removes the need to store long-lived passwords or client keys.
Related guides
In this post