# Implement IaC for Machine Learning — Practice reading

Exam: AI-300 — Operationalizing Machine Learning and Generative AI Solutions
Knowledge domain: Design and implement an MLOps infrastructure
HTML: https://learningpathx.com/learning-path/AI-300/learn/508

This public learning practice includes correct answers and existing explanations. Reading does not save progress or create a test.

## Question 1

Type: multiple\_choice
Knowledge point: Configure GitHub integration with Machine Learning to enable secure access

A cloud architect is designing GitHub Actions access to an Azure Machine Learning workspace. The workflow submits command jobs, registers model assets, and directly reads a private Blob validation dataset as its own workload principal. Infrastructure creation and compute provisioning are handled by a separate authorized process.

Workspace `publicNetworkAccess` remains `Disabled`. An approved workspace private endpoint exists in a customer-managed VNet; the Blob account also has an approved private access path. The workspace's separate managed network governs managed-compute outbound access.

The organization is eligible for GitHub-hosted larger runners with Azure VNet networking and can alternatively use an Azure VM self-hosted runner. In either case, its runner network may be connected to the private resources. Policy requires noninteractive Azure authentication. Required access to GitHub, Microsoft Entra ID, and Azure Resource Manager is permitted; the workspace private endpoint does not replace ARM's management path.

Which three design controls are required to satisfy the stated access requirements? (Choose 3.)

### Options

**A**

Use a supported runner network with routes and private DNS resolution to the workspace and Blob private endpoints; supported GitHub-hosted Azure VNet networking or an appropriately connected self-hosted runner can supply this reachability.

**B**

Give the workload principal a workspace role and assume that this also grants Blob data read permission on the validation container without checking storage authorization.

**C**

Rely on the workspace-managed outbound network to give an ordinary public GitHub-hosted runner inbound private access to the workspace automatically.

**D**

Authorize the actual workload principal for job submission and model registration at the appropriate workspace scope, and grant its required Blob data-read permission at the validation-data scope.

**E**

Configure supported noninteractive Azure login for the selected runner: for example, OIDC federation for an application principal, or an attached managed identity when using an Azure VM self-hosted runner.

Correct answer: A, D, E

### Explanation

Private reachability, authentication, and authorization are distinct controls. The topology may vary, but each must meet its own requirement. This workflow also reads Blob data directly, so workspace permissions alone are insufficient. Sources: [GitHub-hosted runner Azure private networking](https://docs.github.com/en/organizations/managing-organization-settings/about-azure-private-networking-for-github-hosted-runners-in-your-organization), [Managed-network boundaries](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-managed-network?view=azureml-api-2), [OIDC login](https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure-openid-connect), [Azure VM runner managed-identity login](https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure-identity), [Workspace permissions](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-assign-roles?view=azureml-api-2), [Blob data roles](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/storage).

## Question 2

Type: multiple\_choice
Knowledge point: Configure GitHub integration with Machine Learning to enable secure access

A Platform Engineer separates GitHub Actions deployment access to Development and Production Azure Machine Learning resource groups. The organization uses OIDC and requires the Development workflow identity to have no Production permissions. Production deployments must wait for a separate approver, and only the main branch may deploy to Production. These GitHub environment protections are available in the repository's plan. Which two configuration decisions jointly enforce these requirements? (Choose 2.)

### Options

**A**

Use one federated Azure identity with Contributor on both resource groups, distinguished only by the deployment job name.

**B**

Use protected Development and Production GitHub environments; restrict Production to main, require a reviewer, prevent self-review and disallow administrative bypass.

**C**

Give both Azure identities Production Contributor and rely on GitHub environment labels to restrict Azure authorization.

**D**

Use distinct Azure identities scoped to their own resource groups, with each federation trusting only the corresponding environment subject emitted by the repository.

**E**

Give a Development-scoped identity a Production-environment federated subject and use it for both environments.

Correct answer: B, D

### Explanation

Cloud privilege scope and protected GitHub job execution jointly enforce environment separation.

## Question 3

Type: single\_choice
Knowledge point: Configure GitHub integration with Machine Learning to enable secure access

An MLOps Engineer configures GitHub Actions OIDC authentication to Azure for a Production deployment. Token issuance succeeds, but Microsoft Entra rejects the federation match. The existing repository has retained its legacy subject format; it was not renamed, transferred or opted into immutable subjects. No client secret is used. The client ID identifies the intended Azure identity, whose Production RBAC assignment has already been verified.

The complete relevant claim comparison is:

```json
{"issued_token":{"iss":"https://token.actions.githubusercontent.com","aud":"api://AzureADTokenExchange","sub":"repo:contoso/ml-app:environment:Production"},"federated_credential":{"issuer":"https://token.actions.githubusercontent.com","audiences":["api://AzureADTokenExchange"],"subject":"repo:contoso/ml-app:ref:refs/heads/main"}}
```

Which change addresses the mismatch for this Production environment job? (Choose 1.)

### Options

**A**

Set the federated credential subject to repo:contoso/ml-app:environment:Production.

**B**

Replace the token audience with the GitHub repository URL while leaving the configured audience unchanged.

**C**

Grant subscription Owner to the Azure identity while retaining the current federated subject.

**D**

Store a GitHub PAT as the Azure client secret while retaining the federation settings.

Correct answer: A

### Explanation

Federation must match the emitted token claims before RBAC authorization can be used.

## Question 4

Type: multiple\_choice
Knowledge point: Configure GitHub integration with Machine Learning to enable secure access

An MLOps Architect configures GitHub Actions to submit a training job to an Azure Machine Learning workspace. Public network access is Disabled. An approved private endpoint, client DNS and routes give the selected Linux self-hosted runner private access. The runner meets the referenced actions' runtime requirements and has Git 2.18 or later and the Azure CLI ml extension v2 installed, and the job's code directory is inside the checked-out repository.

The workflow uses OIDC. A matching federated identity credential and least-privilege job-submission permissions have been configured. The action references below illustrate supported major versions; they do not claim complete dependency pinning.

```yaml
name: Train Model
on: [push]
permissions:
  contents: read
  id-token: write
jobs:
  train:
    runs-on: [self-hosted, vnet-runner]
    steps:
      - uses: actions/checkout@v7
      - uses: azure/login@v3
        with:
          client-id: ${{ vars.AZURE_CLIENT_ID }}
          tenant-id: ${{ vars.AZURE_TENANT_ID }}
          subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
      - name: Submit job
        shell: bash
        run: |
          az ml job create --file src/job.yml --workspace-name my-secure-ws --resource-group ml-rg
```

Which statements correctly characterize secure submission and its source audit trail? (Choose 3.)

### Options

**A**

The selected runner needs the private network path and correct client DNS; a supported GitHub-hosted runner with suitable private networking could also meet that requirement.

**B**

Excluding .git from the uploaded code snapshot with .amlignore necessarily prevents the CLI from inspecting the runner's local Git revision.

**C**

With local Git available, inspect the submitted job's Git properties, including commit and dirty state, rather than treating checkout alone as complete reproducibility evidence.

**D**

OIDC federation can authenticate this unattended workflow without a stored service-principal secret, while Azure permissions must still authorize job submission.

**E**

The Azure Machine Learning CLI job-submission command requires PowerShell and cannot run in Bash.

Correct answer: A, C, D

### Explanation

Correct answers: A, C, D.

Option analysis:

* **A — The selected runner needs the private network path and correct client DNS; a supported GitHub-hosted runner with suitable private networking could also meet that requirement.**: Private client access depends on routes and name resolution to the endpoint. Self-hosting is one implementation; GitHub documents private-network options for hosted runners too. Merely creating Private Link does not disable public access; that is explicitly configured here.
* **B — Excluding .git from the uploaded code snapshot with .amlignore necessarily prevents the CLI from inspecting the runner's local Git revision.**: Upload exclusion controls which files enter the code snapshot. It does not remove the runner's local .git directory or inherently prevent local Git inspection. Verify the actual job properties rather than inferring missing provenance from an exclusion rule.
* **C — With local Git available, inspect the submitted job's Git properties, including commit and dirty state, rather than treating checkout alone as complete reproducibility evidence.**: Azure ML can capture local repository, commit and dirty-state properties when Git and source context are available. A commit alone cannot describe uncommitted changes or pin data, environment and other dependencies, so it does not guarantee reproducibility.
* **D — OIDC federation can authenticate this unattended workflow without a stored service-principal secret, while Azure permissions must still authorize job submission.**: The login action supports OIDC with a configured federated trust and id-token permission. Authentication does not grant Azure job/data permissions by itself; those must be provisioned separately at appropriate scopes.
* **E — The Azure Machine Learning CLI job-submission command requires PowerShell and cannot run in Bash.**: This command can run in Bash. Shell quoting and installed tooling matter, but PowerShell is not an exclusive requirement.

## Question 5

Type: single\_choice
Knowledge point: Deploy Machine Learning workspaces and resources by using Bicep and Azure CLI

During platform design approval, a Solution Architect must decide how to structure the Bicep templates for provisioning the core MLOps environment. The organization requires that the Key Vault and Storage Account be provisioned independently and reused across multiple distinct Machine Learning workspaces in the same subscription to reduce administrative overhead.

```
// main.bicep
param location string = resourceGroup().location
param storageAccountId string
param keyVaultId string
resource mlWorkspace 'Microsoft.MachineLearningServices/workspaces@2024-04-01' = {
  name: 'central-ai-workspace'
  location: location
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    <DEPENDENCY_MAPPING>
  }
}
```

To correctly map the independently provisioned prerequisites to the new workspace, which specific properties must the architect include within the properties block to replace <DEPENDENCY\_MAPPING>?

### Options

**A**

linkedStorage: storageAccountId and linkedVault: keyVaultId as linked resources

**B**

storageAccount: storageAccountId and keyVault: keyVaultId as resource identifiers

**C**

storageAccountName: storageAccountId and keyVaultName: keyVaultId for name mapping

**D**

storageAccount: resourceId(storageAccountId) and keyVault: reference(keyVaultId)

Correct answer: B

### Explanation

The workspace ARM properties storageAccount and keyVault take the full resource IDs already supplied as parameters. This mapping does not create or authorize those dependencies. Their supported configuration and the workspace identity permissions must separately be satisfied; sharing dependencies also couples access and lifecycle.

## Question 6

Type: single\_choice
Knowledge point: Deploy Machine Learning workspaces and resources by using Bicep and Azure CLI

An engineer is preparing a resource-group-scoped Bicep deployment of a new Azure Machine Learning workspace with customer-managed encryption. The workspace resource uses Microsoft.MachineLearningServices/workspaces@2024-04-01\. A suitable Key Vault key exists; the vault has soft delete and purge protection, and the intended encryption identity has the necessary key-access permissions. The complete relevant workspace settings planned for encryption are: properties.encryption.status = 'Enabled', properties.encryption.keyVaultProperties.keyVaultArmId = the vault ARM resource ID, and properties.encryption.keyVaultProperties.keyIdentifier = that vault's ARM resource ID. All other required workspace properties and dependencies have been supplied correctly. Before running az deployment group create, what should the engineer correct?

### Options

**A**

Set properties.encryption.status to 'Disabled' and retain both identifiers

**B**

Set keyIdentifier to the Key Vault key URI, retaining the vault ARM resource ID in keyVaultArmId

**C**

Set keyVaultArmId to the key URI and retain the vault ARM resource ID in keyIdentifier

**D**

Remove keyIdentifier and keep only keyVaultArmId because the vault contains the key

Correct answer: B

### Explanation

Correct answer: B.

Option analysis:

* **A — Set properties.encryption.status to 'Disabled' and retain both identifiers**: Disabling the encryption setting does not meet the customer-managed encryption requirement or repair the incorrect key reference.
* **B — Set keyIdentifier to the Key Vault key URI, retaining the vault ARM resource ID in keyVaultArmId**: The two fields identify different objects: keyVaultArmId identifies the vault resource, while keyIdentifier is the URI of the encryption key in that vault.
* **C — Set keyVaultArmId to the key URI and retain the vault ARM resource ID in keyIdentifier**: Swapping the fields reverses their documented meanings. The vault field needs an ARM resource ID, and the key field needs a key URI.
* **D — Remove keyIdentifier and keep only keyVaultArmId because the vault contains the key**: The API requires keyIdentifier in addition to keyVaultArmId. Identifying the vault alone does not identify the intended encryption key.

## Question 7

Type: single\_choice
Knowledge point: Deploy Machine Learning workspaces and resources by using Bicep and Azure CLI

An MLOps Engineer is reviewing the deployment configuration for a new Azure Machine Learning workspace during an architecture trade-off review. The enterprise architecture mandates that all cloud resources must be defined declaratively and version-controlled. The team needs to deploy the workspace alongside its prerequisite resources (Storage Account, Key Vault, Container Registry, and Application Insights) using a single, modular infrastructure template. Which architectural approach best fulfills this declarative multi-resource deployment constraint?

### Options

**A**

Define an MLflow run configuration file to dynamically generate the required Azure infrastructure during the first training pipeline execution.

**B**

Use the Azure portal to manually create the resource group and export the resulting ARM JSON to source control.

**C**

Write an imperative Azure CLI bash script containing a sequence of az create commands to provision the prerequisite resources followed by the workspace.

**D**

Develop a Bicep template utilizing the Microsoft.MachineLearningServices/workspaces provider and reference the underlying dependent resource modules.

Correct answer: D

### Explanation

The requirement is a version-controlled declarative deployment that composes the workspace and its dependencies as modules. A Bicep template provides that construction; exporting a manually created resource group is not the specified modular multi-resource rollout.

## Question 8

Type: multiple\_choice
Knowledge point: Deploy Machine Learning workspaces and resources by using Bicep and Azure CLI

A new workspace is being created with a compatible installed Azure CLI ml extension. Subscription selection, authentication, roles, providers, and policy have been validated. Policy allows default dependency creation. The file is:

```yaml
$schema: https://azuremlschemas.azureedge.net/latest/workspace.schema.json
name: ws-ci
location: eastus
display_name: CI workspace
```

The command is:

```bash
az ml workspace create --file workspace-config.yml --resource-group rg-ml --name ws-ci
```

Which two statements are correct? (Choose 2.)

### Options

**A**

The schema declaration grants the caller permission to create the workspace.

**B**

Creation is categorically impossible unless storage and Key Vault IDs are explicit.

**C**

The YAML must be compatible with the installed extension's supported workspace schema.

**D**

The create command guarantees seamless updates for every future region or security change.

**E**

The CLI can create omitted default storage and Key Vault dependencies under the stated conditions.

Correct answer: C, E

### Explanation

A supported file and command describe creation, while the caller and platform prerequisites authorize it. Default storage and Key Vault dependencies can be created when omitted under these conditions. This does not prove arbitrary existing-state updates or future security and region changes are seamless.

## Question 9

Type: multiple\_choice
Knowledge point: Deploy Machine Learning workspaces and resources by using Bicep and Azure CLI

A DevOps Engineer is designing a generic Bicep module to deploy Azure Machine Learning compute clusters. The module needs to be reusable across both Development and Production environments. The cluster must automatically downscale to zero nodes when idle to save costs, but production workloads require a higher maximum node limit.

```
// computeCluster.bicep
param workspaceName string
param clusterName string
param maxNodes int
param vmSize string = 'Standard_DS3_v2'
resource amlCompute 'Microsoft.MachineLearningServices/workspaces/computes@2024-04-01' = {
  name: '${workspaceName}/${clusterName}'
  location: resourceGroup().location
  properties: {
    computeType: 'AmlCompute'
    properties: {
      vmSize: vmSize
      scaleSettings: {
        maxNodeCount: maxNodes
        minNodeCount: 0
        nodeIdleTimeBeforeScaleDown: 'PT120S'
      }
    }
  }
}
```

When utilizing this modular Bicep approach to deploy compute resources via Azure CLI in a CI/CD pipeline, which statements correctly describe the deployment behavior and constraints? (Choose 3.)

### Options

**A**

Executing az deployment group create --template-file computeCluster.bicep allows the pipeline to dynamically pass --parameters maxNodes=4 for Development and --parameters maxNodes=10 for Production.

**B**

The minNodeCount: 0 property guarantees that the underlying Virtual Machine Scale Set is completely deleted from Azure during idle periods to eliminate metadata costs.

**C**

The Bicep template defines a child resource; it must correctly construct the name property using the <parent-workspace-name>/<child-compute-name> syntax if deployed independently.

**D**

If the target workspace defined by workspaceName does not exist at execution time, the Azure CLI will automatically provision a new default workspace before creating the compute.

**E**

The nodeIdleTimeBeforeScaleDown string PT120S conforms to the ISO 8601 duration format required by the ARM API to specify a 120-second idle timeout.

Correct answer: A, C, E

### Explanation

The template parameterizes the upper node limit and declares the compute as a workspace child resource. A zero minimum allows idle worker nodes to scale down, while PT120S specifies the idle period; it does not delete the logical target or guarantee zero total infrastructure cost.

## Question 10

Type: multiple\_choice
Knowledge point: Automate resource provisioning by using GitHub Actions workflows

A Platform Engineer prepares OIDC for this workflow. The trusted runner has Azure CLI/ml, verified config/cluster.yml and an allowed control-plane path. The existing Entra application/service principal has scoped compute-provisioning authority but no federated credential. Nonsecret variables are populated. This repository was created in 2025 and has not renamed, transferred or opted into immutable subjects. Trusted diagnostics captured subject `repo:example-org/ml-infra:ref:refs/heads/main` and issuer `https://token.actions.githubusercontent.com`, not a bearer token.

```yaml
name: Provision AML compute
on:
  push:
    branches: [main]
permissions:
  contents: read
jobs:
  provision:
    runs-on: [self-hosted, linux, aml-ci]
    steps:
      - uses: azure/login@v3
        with:
          client-id: ${{ vars.AZURE_CLIENT_ID }}
          tenant-id: ${{ vars.AZURE_TENANT_ID }}
          subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
          audience: api://AzureADTokenExchange
      - name: Provision approved cluster
        shell: bash
        env:
          CLUSTER_NAME: ${{ vars.CLUSTER_NAME }}
        run: |
          set -euo pipefail
          [[ "$CLUSTER_NAME" =~ ^[a-z][a-z0-9-]{0,30}$ ]] || exit 1
          az ml compute create --file config/cluster.yml --name "$CLUSTER_NAME" --workspace-name mlw-production --resource-group rg-mlops-prod
```

Which two changes supply missing OIDC requirements? (Choose 2.)

### Options

**A**

Add a federated credential to the Entra application matching the actual issuer, observed main-branch subject and api://AzureADTokenExchange audience.

**B**

Grant effective id-token: write to the provision job, through applicable workflow permissions or its own job permissions.

**C**

Replace Bash with PowerShell because Azure CLI cannot use OIDC-established authentication.

**D**

Enable workspace public networking to make Entra accept the GitHub token.

**E**

Grant tenant-wide Owner because token generation also supplies resource-management authority.

Correct answer: A, B

### Explanation

Federated trust and token-request permission are distinct from existing Azure RBAC and network reachability.

## Question 11

Type: single\_choice
Knowledge point: Automate resource provisioning by using GitHub Actions workflows

A GitHub Actions provisioning job runs on `ubuntu-latest`. It has already checked out the repository and authenticated to the correct Azure subscription with `azure/login@v2`. The identity has deployment and resource-creation permissions in the existing resource group `rg-ml-prod`.

The repository contains a validated, resource-group-scoped Bicep template at `infra/main.bicep`. It declares an Azure Machine Learning workspace and its required linked resources. All dependencies are resolvable. Its only parameter without a default is `workspaceName`. Azure CLI and Bicep are available on the runner. The job must create the declared resources in `rg-ml-prod` with workspace name `ml-prod`; a build or preview alone is insufficient.

Which step should you append to the job?

### Options

**A**

`yaml - name: Provision workspace resources shell: bash run: | az deployment group create \ --resource-group rg-ml-prod \ --template-file infra/main.bicep \ --parameters workspaceName=ml-prod `

**B**

`yaml - name: Provision workspace resources shell: bash run: | az deployment group what-if \ --resource-group rg-ml-prod \ --template-file infra/main.bicep \ --parameters workspaceName=ml-prod `

**C**

`yaml - name: Provision workspace resources shell: bash run: | az bicep build \ --file infra/main.bicep \ --outfile infra/main.json `

**D**

`yaml - name: Provision workspace resources shell: bash run: | az deployment sub create \ --location eastus \ --template-file infra/main.bicep \ --parameters workspaceName=ml-prod `

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* \*\*A — \`\`\`yaml
* name: Provision workspace resources  
  shell: bash  
  run: |  
  az deployment group create   
  \--resource-group rg-ml-prod   
  \--template-file infra/main.bicep   
  \--parameters workspaceName=ml-prod

````
- **B — ```yaml
- name: Provision workspace resources
  shell: bash
  run: |
    az deployment group what-if \
      --resource-group rg-ml-prod \
      --template-file infra/main.bicep \
      --parameters workspaceName=ml-prod
```**: The what-if operation previews proposed changes. It can be a useful preceding check, but does not create the resources required by this job.
- **C — ```yaml
- name: Provision workspace resources
  shell: bash
  run: |
    az bicep build \
      --file infra/main.bicep \
      --outfile infra/main.json
```**: Building Bicep produces an ARM JSON template locally. Compilation alone neither submits a deployment nor provisions the workspace and linked resources.
- **D — ```yaml
- name: Provision workspace resources
  shell: bash
  run: |
    az deployment sub create \
      --location eastus \
      --template-file infra/main.bicep \
      --parameters workspaceName=ml-prod
```**: The subscription create operation uses a different deployment scope. The stated template is resource-group scoped, so this command cannot replace the required resource-group deployment.
````

## Question 12

Type: multiple\_choice
Knowledge point: Automate resource provisioning by using GitHub Actions workflows

A Quality Engineer is reviewing a GitHub Actions workflow designed to automate the provisioning of datastores. The team wants to ensure that the workflow does not deploy malformed or insecure configurations to the production Azure Machine Learning workspace.

```
jobs:
  validate-infrastructure:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Azure Login
      uses: azure/login@v1
      with:
        creds: ${{ secrets.AZURE_CREDENTIALS }}
    - name: Validate Bicep Template
      run: |
        az deployment group validate \
          --resource-group rg-mlops-prod \
          --template-file infrastructure/datastore.bicep
    - name: What-If Analysis
      run: |
        az deployment group what-if \
          --resource-group rg-mlops-prod \
          --template-file infrastructure/datastore.bicep
```

Which two design tradeoffs and risk consequences are addressed by incorporating the validate and what-if steps into the GitHub Actions workflow before actual deployment? (Choose 2.)

### Options

**A**

validate ensures the Bicep syntax is correct and Azure Resource Manager APIs accept the schema before any infrastructure is modified.

**B**

what-if simulates deployment against the resource group, showing which resources are created, modified, or deleted without executing actual changes.

**C**

Running these commands automatically locks the production workspace, preventing data scientists from running training jobs until the entire workflow finishes.

**D**

These commands automatically generate a rollback script that GitHub Actions can now easily execute if the subsequent deployment step fails.

**E**

The validate step automatically provisions a temporary sandbox workspace to run integration tests against the datastore schema.

Correct answer: A, B

### Explanation

Validation checks the deployable template and what-if predicts control-plane changes before deployment. These reduce configuration and unintended-change risks, but neither proves every security policy, runtime dependency or integration behavior, nor generates rollback automatically.

## Question 13

Type: single\_choice
Knowledge point: Automate resource provisioning by using GitHub Actions workflows

A Solution Architect completes parameter passing in GitHub Actions. OIDC federation and required deployment permissions are configured. workspaceName is ordinary configuration; bootstrapToken is sensitive. Policy forbids its value in committed files, command-line arguments or intentional log output. A temporary access-restricted runner parameter file is allowed if removed after the step. Masking alone is not proof of protection.

The relevant main.bicep declarations are:

```bicep
param workspaceName string
@secure()
param bootstrapToken string
```

The remaining template is reviewed not to emit this token in outputs or nonsecure fields. The workflow is:

```yaml
name: Deploy ML infrastructure
on: workflow_dispatch
permissions:
  contents: read
  id-token: write
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: azure/login@v2
        with:
          client-id: ${{ vars.AZURE_CLIENT_ID }}
          tenant-id: ${{ vars.AZURE_TENANT_ID }}
          subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
      - name: Deploy
        shell: bash
        env:
          TARGET_RG: ${{ vars.RESOURCE_GROUP }}
          WORKSPACE_NAME: ${{ vars.WORKSPACE_NAME }}
          BOOTSTRAP_TOKEN: ${{ secrets.BOOTSTRAP_TOKEN }}
        run: |
          # Insert the selected strategy here.
```

Which passing strategy meets this policy? (Choose 1.)

### Options

**A**

Replace the Bicep parameter declaration with the literal token and commit the file.

**B**

Add bootstrapToken to azure/login and assume it automatically binds a Bicep parameter.

**C**

Create and pass a protected temporary JSON parameter file from environment values without printing its contents:  
  
`bash set -euo pipefail set +x umask 077 parameter_file=$(mktemp "$RUNNER_TEMP/deployment-params.XXXXXX.json") export PARAMETER_FILE="$parameter_file" trap 'rm -f -- "$parameter_file"' EXIT python - <<'PY' import json import os with open(os.environ["PARAMETER_FILE"], "w", encoding="utf-8") as stream: json.dump({"parameters": { "workspaceName": {"value": os.environ["WORKSPACE_NAME"]}, "bootstrapToken": {"value": os.environ["BOOTSTRAP_TOKEN"]} }}, stream) PY az deployment group create \ --resource-group "$TARGET_RG" \ --template-file infrastructure/main.bicep \ --parameters "@$parameter_file" \ --output none `

**D**

Pass --parameters "bootstrapToken=$BOOTSTRAP\_TOKEN" and rely only on secret masking.

Correct answer: C

### Explanation

Correct answer: C.

Option analysis:

* **A — Replace the Bicep parameter declaration with the literal token and commit the file.**: Committing the literal token violates the source-control requirement.
* **B — Add bootstrapToken to azure/login and assume it automatically binds a Bicep parameter.**: azure/login authenticates the runner; it does not bind arbitrary ARM template parameters.
* \*\*C — Create and pass a protected temporary JSON parameter file from environment values without printing its contents:

````bash
set -euo pipefail
set +x
umask 077
parameter_file=$(mktemp "$RUNNER_TEMP/deployment-params.XXXXXX.json")
export PARAMETER_FILE="$parameter_file"
trap 'rm -f -- "$parameter_file"' EXIT
python - <<'PY'
import json
import os
with open(os.environ["PARAMETER_FILE"], "w", encoding="utf-8") as stream:
    json.dump({"parameters": {
        "workspaceName": {"value": os.environ["WORKSPACE_NAME"]},
        "bootstrapToken": {"value": os.environ["BOOTSTRAP_TOKEN"]}
    }}, stream)
PY
az deployment group create \
  --resource-group "$TARGET_RG" \
  --template-file infrastructure/main.bicep \
  --parameters "@$parameter_file" \
  --output none
```**: JSON serialization treats environment values as data. A protected filename enters the CLI argument list, tracing/output are disabled, cleanup is registered, and @secure() bounds ARM parameter handling. This does not guarantee that arbitrary later code cannot leak the secret.
- **D — Pass --parameters "bootstrapToken=$BOOTSTRAP_TOKEN" and rely only on secret masking.**: Quoting helps shell parsing, but the expanded token remains in the command's argument list. Masking does not meet that separate prohibition.
````

## Question 14

Type: single\_choice
Knowledge point: Automate resource provisioning by using GitHub Actions workflows

An MLOps Engineer configures GitHub Actions on a standard GitHub-hosted ubuntu-latest runner to deploy an Azure Machine Learning workspace and its dependent resources into an existing resource group. The deployment creates resources but does not create RBAC role assignments. The organization requires passwordless noninteractive login. The workflow will use Azure Login with OIDC, request id-token: write, and supply the selected client, tenant and subscription IDs. Which Azure identity setup completes this authentication and resource-provisioning path? (Choose 1.)

### Options

**A**

Use a storage account key as the Azure Resource Manager login credential.

**B**

Attach an Azure system-assigned managed identity directly to the standard GitHub-hosted runner.

**C**

Use a developer's interactive account and disable MFA for unattended login.

**D**

Configure a service principal or supported user-assigned managed identity with a matching GitHub federated credential and resource-group Contributor permissions.

Correct answer: D

### Explanation

The hosted runner exchanges its GitHub OIDC token through the preconfigured federation relationship. Azure RBAC then authorizes resource creation; Contributor does not grant role-assignment authority.

## Question 15

Type: single\_choice
Knowledge point: Restrict network access to Machine Learning workspaces

A Security Architect must restrict outbound access from Azure ML compute clusters and compute instances to required platform services and approved external destinations. Azure ML should manage the compute network rather than a customer-managed hub-and-spoke subnet. Which native configuration meets this requirement?

### Options

**A**

Configure the workspace managed virtual network with `allow_only_approved_outbound` and review required and additional outbound rules.

**B**

Place Application Gateway in front of the workspace and use its inbound web application firewall to approve compute egress.

**C**

Assign Network Contributor to operators without changing the workspace network configuration.

**D**

Use only the workspace storage account firewall as the destination filter for all compute connections.

Correct answer: A

### Explanation

Workspace-managed approved outbound isolation supplies destination controls. Approved rules still require review and do not guarantee prevention of all exfiltration.

## Question 16

Type: multiple\_choice
Knowledge point: Restrict network access to Machine Learning workspaces

A Quality Engineer troubleshoots default-storage access from Azure ML managed compute in an AllowOnlyApprovedOutbound managed network. The following hypothetical state summary is complete for the failing Blob path:

```
default_storage_public_access=Disabled
required_blob_outbound_rule=Present
required_file_outbound_rule=Present
file_connection=Approved
blob_connection=Pending
workspace_managed_identity_approval_permission=Revoked
job_storage_data_read_permission=Verified
dns_and_route_configuration=Verified
```

Required default-resource rules were generated automatically. An authorized storage administrator can approve the pending connection. Which two actions remediate this specific state and verify recovery without widening public access? (Choose 2.)

### Options

**A**

Approve a private endpoint in the customer's hub network and leave the managed-network Blob connection pending.

**B**

Have the authorized administrator approve the pending managed-network Blob connection and restore the scoped approval permission for future provisioning.

**C**

Create duplicate Blob and file rules because default-storage rules must always be added manually.

**D**

Add Storage Blob Data Reader again and treat the Pending connection as unrelated to the job failure.

**E**

Reconcile the existing managed-network rule/connection state after approval, then retry the same private-path data read.

Correct answer: B, E

### Explanation

Diagnose the observed approval state while preserving automatically generated rules and private routing.

## Question 17

Type: single\_choice
Knowledge point: Restrict network access to Machine Learning workspaces

An infrastructure team manages an Azure Machine Learning workspace using CLI ml extension v2\. Policy requires private workspace data-plane access. Configuration includes: \~\~\~yaml public\_network\_access: Disabled image\_build\_compute: build-cpu \~\~\~ The workspace has an approved endpoint in services-vnet. Storage, Key Vault, and Container Registry dependencies also have approved private endpoints there. The existing build-cpu cluster has required permissions and reaches them; no image-build failure is outstanding. An authorized analyst's laptop is on the public internet with no route to services-vnet. Corporate DNS resolves the workspace endpoint to its public address. The analyst needs workspace APIs and private training blobs. RBAC assignments are correct. Management-plane and Microsoft Entra endpoints remain reachable through approved corporate egress. Which plan makes access usable while preserving policy?

### Options

**A**

Enable public workspace access and rely on the private endpoint to force all clients to private addresses.

**B**

Keep public access disabled; connect the laptop by point-to-site VPN to services-vnet, supply private DNS for workspace and dependency endpoints, and permit required private routes and ports.

**C**

Keep public access disabled and grant Owner on the workspace; this role supplies private-endpoint connectivity.

**D**

Keep public access disabled and add a hosts-file entry for the private workspace IP; no routed connection or dependency DNS is needed.

Correct answer: B

### Explanation

Correct answer: B.

Option analysis:

* **A — Enable public workspace access and rely on the private endpoint to force all clients to private addresses.**: Enabled public access adds a public path; the endpoint does not force all clients onto private addresses.
* **B — Keep public access disabled; connect the laptop by point-to-site VPN to services-vnet, supply private DNS for workspace and dependency endpoints, and permit required private routes and ports.**: The laptop needs routing, DNS, and private connectivity to the workspace and dependencies. The build-compute configuration remains usable.
* **C — Keep public access disabled and grant Owner on the workspace; this role supplies private-endpoint connectivity.**: RBAC supplies neither network routes nor name resolution.
* **D — Keep public access disabled and add a hosts-file entry for the private workspace IP; no routed connection or dependency DNS is needed.**: Resolving an IP does not create a route, and blob access also requires storage connectivity.

## Question 18

Type: multiple\_choice
Knowledge point: Restrict network access to Machine Learning workspaces

An MLOps Architect investigates Key Vault access failures during Azure Machine Learning job initialization. The workspace has public network access disabled and uses a system-assigned managed identity. The associated vault is network-restricted. The submitting VM can resolve and reach its private endpoint, but these tests have not been performed on the compute subnet. The engineer must check both direct compute-to-vault access and Azure ML service-side access. The service-side operation is eligible for the documented trusted-services exception and the vault is not governed by a Network Security Perimeter. The vault's authorization mode must also be checked before assigning a role or changing an access policy. Which three missing configurations could block the corresponding access path? (Choose 3.)

### Options

**A**

The submitting user lacks Owner on the associated Azure Container Registry.

**B**

The applicable Azure ML service-side vault path is blocked because the vault's trusted-services bypass is disabled.

**C**

The workspace identity lacks the vault secret permissions required by the operation in the vault's configured authorization mode.

**D**

The compute subnet lacks working DNS or routing to the vault private endpoint.

**E**

All vault traffic has not been forced through Azure Firewall, even though the permitted private path otherwise works.

Correct answer: B, C, D

### Explanation

Network admission and vault authorization are separate checks. Tests from the submitting VM do not prove compute-subnet connectivity, and the trusted-service exception is relevant only to the explicitly eligible service-side path.

## Question 19

Type: multiple\_choice
Knowledge point: Restrict network access to Machine Learning workspaces

An Azure ML workspace uses a managed virtual network with allow\_only\_approved\_outbound. The workspace storage and dependent private endpoints have been approved. Required Azure service rules are retained. A training environment must pull a base image from Microsoft Container Registry and install a package from public PyPI. There is no existing custom PyPI rule. Which three statements correctly describe the required outbound controls and their limits? (Choose 3.)

### Options

**A**

Use the documented MicrosoftContainerRegistry service-tag rule for the required base-image access

**B**

Approve FQDN outbound access to pypi.org and files.pythonhosted.org for the package workflow, subject to the organization's policy

**C**

Remove all required Azure service rules because approved-only mode works without platform dependencies

**D**

Treat approved-only mode as a universal guarantee that no training code can exfiltrate data through any approved destination

**E**

Account for the firewall resources and associated charges needed for approved FQDN outbound rules

Correct answer: A, B, E

### Explanation

Apply approved outbound rule types and cost constraints to the stated image and package dependencies.

## Question 20

Type: multiple\_choice
Knowledge point: Manage source control for machine learning projects by using Git

A platform team wants early local feedback on Git commit-message format and staged secrets, plus a central gate preventing unvalidated pull requests from merging into main. Main is protected against direct pushes and bypass by these contributors. The team accepts that local hooks can be bypassed and neither layer guarantees a secret has never entered any repository history. Which two controls meet the complementary objectives? (Choose 2.)

### Options

**A**

Provide a commit-message template and rely on developers to follow it without validation.

**B**

Require signed commits and use signature verification as the sole check for message format and secret content.

**C**

Use a `commit-msg` hook for message validation and a `pre-commit` hook for staged-content secret scanning.

**D**

Run secret and message checks as optional CI jobs whose failures do not block merging.

**E**

Require pull requests and trusted, mandatory secret-scanning and message-validation status checks for main.

Correct answer: C, E

### Explanation

Use the correct local hook for each kind of input and repeat the checks in the trusted main-branch merge gate. These controls have explicit coverage and bypass boundaries.

## Question 21

Type: single\_choice
Knowledge point: Manage source control for machine learning projects by using Git

An MLOps Architect uses Git for training scripts and pipeline YAML. Production deployment always consumes the latest commit on main. A developer's experiment has not passed validation, while another developer must ship a validated fix today. The team requires all changes entering main to pass review and the required pipeline checks, without waiting for unfinished experiments. Which workflow meets these requirements?

### Options

**A**

Keep experiments on feature branches, but allow direct pushes to main whenever the author reports that local tests passed.

**B**

Create a release branch for the fix while continuing to push experiments to main, leaving production pointed at main.

**C**

Use feature branches and pull requests into protected main with required reviews and pipeline status checks.

**D**

Freeze all merges into main until every open experiment is complete, then validate the accumulated changes together.

Correct answer: C

### Explanation

Branch isolation and enforced merge validation work together; neither an extra repository nor a universal branching prescription is necessary.

## Question 22

Type: multiple\_choice
Knowledge point: Manage source control for machine learning projects by using Git

A Machine Learning Engineer manages Python and pipeline source in Git. In this hypothetical repository, raw CSV data and experimental weights are currently untracked and must stay out of ordinary commits. An approved model file under released-models/ must be versioned, but its binary content should be stored through Git LFS. The team understands that ignore rules are not a security barrier. Which two actions implement the required separation? (Choose 2.)

### Options

**A**

Ignore all model files, including the approved release, and assume Git LFS will override that exclusion automatically.

**B**

Add an ignore pattern and assume it also removes previously committed artifacts from history.

**C**

Add scoped .gitignore patterns for the excluded raw-data and experimental-weight paths.

**D**

Configure Git LFS tracking for the approved release path and commit its pointer plus the applicable .gitattributes entry.

**E**

Stage every artifact once before adding the ignore patterns so later commits will ignore them.

Correct answer: C, D

### Explanation

Exclusion and approved versioning are different policies. Audit already tracked files separately, and use a repository enforcement check if a strict prohibition is needed because force-add can bypass ignores.

## Question 23

Type: multiple\_choice
Knowledge point: Manage source control for machine learning projects by using Git

An MLOps Architect governs component YAML, Bicep and source code. Organization policy has adopted one repository for this release and requires these source assets to resolve to the same approved commit. The audit must identify exact deployed container bytes and enforce required change declarations. Which three complementary controls meet this adopted policy? (Choose 3.)

### Options

**A**

Move assets to separate repositories and release each current branch without recording commit versions.

**B**

Record the source commit, container image digest and resolved build inputs in a build receipt; a commit-named image tag may also provide navigation.

**C**

Put shared storage credentials in .git/config and assume every clone gets them.

**D**

Use PR templates for change declarations and a required status check plus protected-branch review to validate them.

**E**

Version all three source asset types at the approved commit and record that exact commit in the release manifest, rather than relying only on a movable tag.

Correct answer: B, D, E

### Explanation

Correct answers: B, D, E.

Option analysis:

* **A — Move assets to separate repositories and release each current branch without recording commit versions.**: Unpinned independent branches violate the stated same-commit policy. Separate repositories can work under a different pinned-manifest policy and are not universally invalid.
* **B — Record the source commit, container image digest and resolved build inputs in a build receipt; a commit-named image tag may also provide navigation.**: A digest identifies image content; the commit/build-input record supplies provenance. A commit-looking image tag alone can move.
* **C — Put shared storage credentials in .git/config and assume every clone gets them.**: .git/config normally contains local repository settings rather than tracked shared release content; it is not a shared secret store.
* **D — Use PR templates for change declarations and a required status check plus protected-branch review to validate them.**: A template prompts declarations; required checks/reviews provide enforcement. A template alone does not require correct fields.
* **E — Version all three source asset types at the approved commit and record that exact commit in the release manifest, rather than relying only on a movable tag.**: The exact commit binds the adopted source set. A mutable tag alone does not prove immutable source identity or full reproducibility.

## Question 24

Type: single\_choice
Knowledge point: Manage source control for machine learning projects by using Git

An MLOps engineer is initializing a local development environment to author Azure Machine Learning custom components (v2) and pipeline orchestration scripts. The organization's MLOps governance mandates that all new pipeline projects must be bootstrapped using the official Microsoft-provided YAML component definitions and pipeline samples. Which command should the engineer execute to retrieve these baseline source control assets to their local workstation?

### Options

**A**

Execute `az ml component list` to export all classic prebuilt components (v1) from the workspace into a local Git repository.

**B**

Execute `git clone https://github.com/Azure/azureml-examples --depth 1` to retrieve the official YAML component definitions and pipeline orchestration samples.

**C**

Configure an Azure Machine Learning registry to act as the primary Git repository for tracking local Python training scripts and YAML component source code.

**D**

Execute `az ml workspace create` to automatically provision a local Git repository containing the default environment conda specifications and Dockerfiles.

Correct answer: B

### Explanation

Cloning the official azureml-examples repository retrieves the requested source samples. The shallow clone limits history to the latest fetched commit; a production baseline should separately record or pin the chosen commit and review the samples for its environment.

