You must recreate an Azure Machine Learning workspace identically in dev, test and prod. What do you use?
Why D is the answer
Bicep templates deployed through a pipeline
Infrastructure as code keeps environments identical and reviewable. Manual steps drift.
In detail
- Bicep templates define the workspace as code.
- A pipeline applies the same definition everywhere.
- Keep environment differences in parameter files.
Use case
An illustrative scenario, not a real incident.
A team's test workspace differs from production, and models behave differently. Bicep templates through a pipeline make all three identical.
See it in different ways
flowchart LR A["Bicep in Git"] --> B["GitHub Actions"] B --> C["Dev workspace"] B --> D["Test workspace"] B --> E["Prod workspace"]
sequenceDiagram participant D as Developer participant G as GitHub participant A as GitHub Actions participant Z as Azure D->>G: Merges a Bicep change G->>A: Starts the workflow A->>Z: Signs in with OpenID Connect A->>Z: Deploys to dev, test and prod
flowchart LR S0["Bicep template"] --> S1["Pipeline"] --> S2["Dev"] --> S3["Test"] --> S4["Prod"]
Key point: Define workspaces as code.
Why the other options are wrong
- A. A shared wiki page
- A wiki describes steps, and it does not run them.
- B. A copy of the dev workspace's notebooks
- Notebooks are not the workspace itself.
- C. Manual steps in the portal
- Manual steps drift between environments.

