English original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Optional: Troubleshooting and 50 Interview Questions

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.
BicepAzure Resource ManagerAzure CLIEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.
Learning outcomes / 学习目标
  • Triage from source to Azure operation — deliver a reviewed, validated change at the right scope
  • Compiler, type and linter diagnostics — deliver a reviewed, validated change at the right scope
  • ARM validation and provider failures — deliver a reviewed, validated change at the right scope
  • Scope, RBAC and identity failures — deliver a reviewed, validated change at the right scope
  • Runtime, quota and dependency failures — deliver a reviewed, validated change at the right scope
  • Pipeline, registry and module failures — deliver a reviewed, validated change at the right scope
  • 20 troubleshooting cases — deliver a reviewed, validated change at the right scope
  • 50 interview questions — deliver a reviewed, validated change at the right scope
Deployments change Azure resources. Write only to an authorized sandbox; confirm tenant, subscription, scope, what-if, permissions and recovery plan first.

Schedule / 课程安排

#ModuleMinutes
1Triage from source to Azure operation7
2Compiler, type and linter diagnostics7
3ARM validation and provider failures7
4Scope, RBAC and identity failures7
5Runtime, quota and dependency failures7
6Pipeline, registry and module failures7
720 troubleshooting cases7
850 interview questions7

Start / 开始 → · Official references / 官方文档

Warm-up and Azure setup / 课前准备与 Azure 设置

Install Azure CLI, Bicep CLI and the VS Code Bicep extension. Use a sandbox subscription and confirm tenant, subscription, role and budget.

az version
az bicep version
az account show
az bicep build --file main.bicep
az bicep lint --file main.bicep
Do not run create/update before reviewing what-if, identity, target scope and recovery plan.

Triage from source to Azure operation

Hour 9 · Module 1 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses Triage from source to Azure operation to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

targetScope = 'resourceGroup'

param location string = resourceGroup().location
param storageName string

resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = {
  name: storageName
  location: location
  sku: { name: 'Standard_LRS' }
  kind: 'StorageV2'
  properties: { supportsHttpsTrafficOnly: true }
}

output resourceId string = storage.id

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns Triage from source to Azure operation? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A team needs per-environment values without copying templates. In this Triage from source to Azure operation drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A resource provider API version changes its required property shape. In this Triage from source to Azure operation drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: An auditor needs reproducible evidence for each infrastructure change. In this Triage from source to Azure operation drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A shared module has breaking changes planned for a new release. In this Triage from source to Azure operation drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A policy denies public endpoints but a legacy system depends on one. In this Triage from source to Azure operation drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A team needs separate owners for subscription and workload resources. In this Triage from source to Azure operation drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A failed pipeline leaves a partially completed deployment. In this Triage from source to Azure operation drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: A development environment must be safely torn down every sprint. In this Triage from source to Azure operation drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A production change must pass review before any write operation. In this Triage from source to Azure operation drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A nested module unexpectedly deploys to the wrong scope. In this Triage from source to Azure operation drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: A template contains a secret copied from a local parameter file. In this Triage from source to Azure operation drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A release introduces a naming collision in one environment. In this Triage from source to Azure operation drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: A central team wants to enforce diagnostic settings consistently. In this Triage from source to Azure operation drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: A deployment stack may delete resources removed from its template. In this Triage from source to Azure operation drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A module registry artifact is missing or inaccessible in CI. In this Triage from source to Azure operation drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: A resource is changed manually after a successful deployment. In this Triage from source to Azure operation drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A what-if report contains many no-change and unsupported lines. In this Triage from source to Azure operation drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: A pipeline needs to deploy to multiple subscriptions with OIDC. In this Triage from source to Azure operation drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: A team is migrating a large ARM JSON template incrementally. In this Triage from source to Azure operation drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A compliance team needs a time-bounded exception process. In this Triage from source to Azure operation drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: A deployment is close to subscription quota limits. In this Triage from source to Azure operation drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A shared platform module has no clear deprecation policy. In this Triage from source to Azure operation drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: A stack uses deny settings that could block child resource changes. In this Triage from source to Azure operation drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: A resource is supported only in selected Azure regions. In this Triage from source to Azure operation drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A team must restore a prior configuration after a faulty change. In this Triage from source to Azure operation drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: A deployment uses a Key Vault reference from another subscription. In this Triage from source to Azure operation drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A module output accidentally exposes a sensitive endpoint token. In this Triage from source to Azure operation drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: A new service needs diagnostic, monitoring, and backup coverage. In this Triage from source to Azure operation drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: A team is standardizing tags and resource naming in Bicep. In this Triage from source to Azure operation drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A pipeline must separate validation credentials from deployment identity. In this Triage from source to Azure operation drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: A management group deployment needs carefully scoped assignments. In this Triage from source to Azure operation drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A module change passes build but fails at provider validation. In this Triage from source to Azure operation drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: An environment promotion must compare source and target configuration. In this Triage from source to Azure operation drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: A team wants to test snapshots without querying live Azure. In this Triage from source to Azure operation drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A production resource has immutable properties that cannot be replaced. In this Triage from source to Azure operation drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: A module uses experimental features without an upgrade owner. In this Triage from source to Azure operation drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A cost review asks which resources a template owns. In this Triage from source to Azure operation drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: A team needs an audited emergency deployment path. In this Triage from source to Azure operation drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: A public module dependency changes upstream behavior. In this Triage from source to Azure operation drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A resource group is created separately from its workload resources. In this Triage from source to Azure operation drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: A cleanup request could remove shared networking by mistake. In this Triage from source to Azure operation drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A template has hard-coded environment names in several modules. In this Triage from source to Azure operation drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: A service team needs to roll back an API-version update. In this Triage from source to Azure operation drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: A deployment has a dependency cycle across modules. In this Triage from source to Azure operation drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A template should adopt secure defaults without blocking exceptions. In this Triage from source to Azure operation drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: An engineer needs to explain deployment history and correlation IDs. In this Triage from source to Azure operation drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A team is splitting a monolithic template into ownership domains. In this Triage from source to Azure operation drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: A release must support both cloud-hosted and private agents. In this Triage from source to Azure operation drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for Triage from source to Azure operation. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A regional rollout needs consistent network and policy baselines. Review the production rollout for Triage from source to Azure operation. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a Triage from source to Azure operation failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: Triage from source to Azure operation — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: Triage from source to Azure operation — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: Triage from source to Azure operation — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: Triage from source to Azure operation — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: Triage from source to Azure operation — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of Triage from source to Azure operation in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Next →

Compiler, type and linter diagnostics

Hour 9 · Module 2 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses Compiler, type and linter diagnostics to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

@description('Deployment environment')
@allowed([
  'dev'
  'test'
  'prod'
])
param environment string

@secure()
param bootstrapSecret string

var names = {
  dev: 'Development'
  test: 'Test'
  prod: 'Production'
}

output environmentLabel string = names[environment]

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns Compiler, type and linter diagnostics? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A team needs separate owners for subscription and workload resources. In this Compiler, type and linter diagnostics drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A failed pipeline leaves a partially completed deployment. In this Compiler, type and linter diagnostics drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: A development environment must be safely torn down every sprint. In this Compiler, type and linter diagnostics drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A production change must pass review before any write operation. In this Compiler, type and linter diagnostics drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A nested module unexpectedly deploys to the wrong scope. In this Compiler, type and linter diagnostics drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A template contains a secret copied from a local parameter file. In this Compiler, type and linter diagnostics drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A release introduces a naming collision in one environment. In this Compiler, type and linter diagnostics drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: A central team wants to enforce diagnostic settings consistently. In this Compiler, type and linter diagnostics drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A deployment stack may delete resources removed from its template. In this Compiler, type and linter diagnostics drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A module registry artifact is missing or inaccessible in CI. In this Compiler, type and linter diagnostics drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: A resource is changed manually after a successful deployment. In this Compiler, type and linter diagnostics drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A what-if report contains many no-change and unsupported lines. In this Compiler, type and linter diagnostics drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: A pipeline needs to deploy to multiple subscriptions with OIDC. In this Compiler, type and linter diagnostics drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: A team is migrating a large ARM JSON template incrementally. In this Compiler, type and linter diagnostics drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A compliance team needs a time-bounded exception process. In this Compiler, type and linter diagnostics drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: A deployment is close to subscription quota limits. In this Compiler, type and linter diagnostics drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A shared platform module has no clear deprecation policy. In this Compiler, type and linter diagnostics drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: A stack uses deny settings that could block child resource changes. In this Compiler, type and linter diagnostics drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: A resource is supported only in selected Azure regions. In this Compiler, type and linter diagnostics drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A team must restore a prior configuration after a faulty change. In this Compiler, type and linter diagnostics drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: A deployment uses a Key Vault reference from another subscription. In this Compiler, type and linter diagnostics drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A module output accidentally exposes a sensitive endpoint token. In this Compiler, type and linter diagnostics drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: A new service needs diagnostic, monitoring, and backup coverage. In this Compiler, type and linter diagnostics drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: A team is standardizing tags and resource naming in Bicep. In this Compiler, type and linter diagnostics drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A pipeline must separate validation credentials from deployment identity. In this Compiler, type and linter diagnostics drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: A management group deployment needs carefully scoped assignments. In this Compiler, type and linter diagnostics drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A module change passes build but fails at provider validation. In this Compiler, type and linter diagnostics drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: An environment promotion must compare source and target configuration. In this Compiler, type and linter diagnostics drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: A team wants to test snapshots without querying live Azure. In this Compiler, type and linter diagnostics drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A production resource has immutable properties that cannot be replaced. In this Compiler, type and linter diagnostics drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: A module uses experimental features without an upgrade owner. In this Compiler, type and linter diagnostics drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A cost review asks which resources a template owns. In this Compiler, type and linter diagnostics drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: A team needs an audited emergency deployment path. In this Compiler, type and linter diagnostics drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: A public module dependency changes upstream behavior. In this Compiler, type and linter diagnostics drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A resource group is created separately from its workload resources. In this Compiler, type and linter diagnostics drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: A cleanup request could remove shared networking by mistake. In this Compiler, type and linter diagnostics drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A template has hard-coded environment names in several modules. In this Compiler, type and linter diagnostics drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: A service team needs to roll back an API-version update. In this Compiler, type and linter diagnostics drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: A deployment has a dependency cycle across modules. In this Compiler, type and linter diagnostics drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A template should adopt secure defaults without blocking exceptions. In this Compiler, type and linter diagnostics drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: An engineer needs to explain deployment history and correlation IDs. In this Compiler, type and linter diagnostics drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A team is splitting a monolithic template into ownership domains. In this Compiler, type and linter diagnostics drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: A release must support both cloud-hosted and private agents. In this Compiler, type and linter diagnostics drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: An environment has drift that must be reconciled before deployment. In this Compiler, type and linter diagnostics drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A parameter-file change could expose secrets in source control. In this Compiler, type and linter diagnostics drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: A policy assignment blocks an otherwise valid deployment. In this Compiler, type and linter diagnostics drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A stack deletion plan might detach or remove production assets. In this Compiler, type and linter diagnostics drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: A product team is moving a manually configured web workload into version control. In this Compiler, type and linter diagnostics drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for Compiler, type and linter diagnostics. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A resource provider API version changes its required property shape. Review the production rollout for Compiler, type and linter diagnostics. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a Compiler, type and linter diagnostics failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: Compiler, type and linter diagnostics — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: Compiler, type and linter diagnostics — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: Compiler, type and linter diagnostics — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: Compiler, type and linter diagnostics — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: Compiler, type and linter diagnostics — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of Compiler, type and linter diagnostics in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Next →

ARM validation and provider failures

Hour 9 · Module 3 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses ARM validation and provider failures to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

param vnetName string
param subnetPrefixes array

resource vnet 'Microsoft.Network/virtualNetworks@2023-09-01' = {
  name: vnetName
  location: resourceGroup().location
  properties: {
    addressSpace: { addressPrefixes: [ '10.40.0.0/16' ] }
    subnets: [for (prefix, i) in subnetPrefixes: {
      name: 'subnet-${i}'
      properties: {
        addressPrefix: prefix
      }
    }]
  }
}

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns ARM validation and provider failures? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A template contains a secret copied from a local parameter file. In this ARM validation and provider failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A release introduces a naming collision in one environment. In this ARM validation and provider failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: A central team wants to enforce diagnostic settings consistently. In this ARM validation and provider failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A deployment stack may delete resources removed from its template. In this ARM validation and provider failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A module registry artifact is missing or inaccessible in CI. In this ARM validation and provider failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A resource is changed manually after a successful deployment. In this ARM validation and provider failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A what-if report contains many no-change and unsupported lines. In this ARM validation and provider failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: A pipeline needs to deploy to multiple subscriptions with OIDC. In this ARM validation and provider failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A team is migrating a large ARM JSON template incrementally. In this ARM validation and provider failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A compliance team needs a time-bounded exception process. In this ARM validation and provider failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: A deployment is close to subscription quota limits. In this ARM validation and provider failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A shared platform module has no clear deprecation policy. In this ARM validation and provider failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: A stack uses deny settings that could block child resource changes. In this ARM validation and provider failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: A resource is supported only in selected Azure regions. In this ARM validation and provider failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A team must restore a prior configuration after a faulty change. In this ARM validation and provider failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: A deployment uses a Key Vault reference from another subscription. In this ARM validation and provider failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A module output accidentally exposes a sensitive endpoint token. In this ARM validation and provider failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: A new service needs diagnostic, monitoring, and backup coverage. In this ARM validation and provider failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: A team is standardizing tags and resource naming in Bicep. In this ARM validation and provider failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A pipeline must separate validation credentials from deployment identity. In this ARM validation and provider failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: A management group deployment needs carefully scoped assignments. In this ARM validation and provider failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A module change passes build but fails at provider validation. In this ARM validation and provider failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: An environment promotion must compare source and target configuration. In this ARM validation and provider failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: A team wants to test snapshots without querying live Azure. In this ARM validation and provider failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A production resource has immutable properties that cannot be replaced. In this ARM validation and provider failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: A module uses experimental features without an upgrade owner. In this ARM validation and provider failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A cost review asks which resources a template owns. In this ARM validation and provider failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: A team needs an audited emergency deployment path. In this ARM validation and provider failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: A public module dependency changes upstream behavior. In this ARM validation and provider failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A resource group is created separately from its workload resources. In this ARM validation and provider failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: A cleanup request could remove shared networking by mistake. In this ARM validation and provider failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A template has hard-coded environment names in several modules. In this ARM validation and provider failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: A service team needs to roll back an API-version update. In this ARM validation and provider failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: A deployment has a dependency cycle across modules. In this ARM validation and provider failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A template should adopt secure defaults without blocking exceptions. In this ARM validation and provider failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: An engineer needs to explain deployment history and correlation IDs. In this ARM validation and provider failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A team is splitting a monolithic template into ownership domains. In this ARM validation and provider failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: A release must support both cloud-hosted and private agents. In this ARM validation and provider failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: An environment has drift that must be reconciled before deployment. In this ARM validation and provider failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A parameter-file change could expose secrets in source control. In this ARM validation and provider failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: A policy assignment blocks an otherwise valid deployment. In this ARM validation and provider failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A stack deletion plan might detach or remove production assets. In this ARM validation and provider failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: A product team is moving a manually configured web workload into version control. In this ARM validation and provider failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: A regulated payment service needs a separate production boundary. In this ARM validation and provider failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A platform team is publishing shared modules for dozens of teams. In this ARM validation and provider failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: An acquisition introduces existing subscriptions and naming rules. In this ARM validation and provider failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A deployment must preserve an existing database and its data. In this ARM validation and provider failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: A pipeline currently uses a long-lived service-principal secret. In this ARM validation and provider failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for ARM validation and provider failures. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A policy denies public endpoints but a legacy system depends on one. Review the production rollout for ARM validation and provider failures. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a ARM validation and provider failures failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: ARM validation and provider failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: ARM validation and provider failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: ARM validation and provider failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: ARM validation and provider failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: ARM validation and provider failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of ARM validation and provider failures in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Next →

Scope, RBAC and identity failures

Hour 9 · Module 4 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses Scope, RBAC and identity failures to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

param location string
param environment string
param addressPrefix string
param diagnosticsWorkspaceId string

module network './modules/network.bicep' = {
  name: 'network-${environment}'
  params: {
    location: location
    addressPrefix: addressPrefix
    diagnosticsWorkspaceId: diagnosticsWorkspaceId
  }
}

output networkId string = network.outputs.vnetId

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns Scope, RBAC and identity failures? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A resource is changed manually after a successful deployment. In this Scope, RBAC and identity failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A what-if report contains many no-change and unsupported lines. In this Scope, RBAC and identity failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: A pipeline needs to deploy to multiple subscriptions with OIDC. In this Scope, RBAC and identity failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A team is migrating a large ARM JSON template incrementally. In this Scope, RBAC and identity failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A compliance team needs a time-bounded exception process. In this Scope, RBAC and identity failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A deployment is close to subscription quota limits. In this Scope, RBAC and identity failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A shared platform module has no clear deprecation policy. In this Scope, RBAC and identity failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: A stack uses deny settings that could block child resource changes. In this Scope, RBAC and identity failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A resource is supported only in selected Azure regions. In this Scope, RBAC and identity failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A team must restore a prior configuration after a faulty change. In this Scope, RBAC and identity failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: A deployment uses a Key Vault reference from another subscription. In this Scope, RBAC and identity failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A module output accidentally exposes a sensitive endpoint token. In this Scope, RBAC and identity failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: A new service needs diagnostic, monitoring, and backup coverage. In this Scope, RBAC and identity failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: A team is standardizing tags and resource naming in Bicep. In this Scope, RBAC and identity failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A pipeline must separate validation credentials from deployment identity. In this Scope, RBAC and identity failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: A management group deployment needs carefully scoped assignments. In this Scope, RBAC and identity failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A module change passes build but fails at provider validation. In this Scope, RBAC and identity failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: An environment promotion must compare source and target configuration. In this Scope, RBAC and identity failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: A team wants to test snapshots without querying live Azure. In this Scope, RBAC and identity failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A production resource has immutable properties that cannot be replaced. In this Scope, RBAC and identity failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: A module uses experimental features without an upgrade owner. In this Scope, RBAC and identity failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A cost review asks which resources a template owns. In this Scope, RBAC and identity failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: A team needs an audited emergency deployment path. In this Scope, RBAC and identity failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: A public module dependency changes upstream behavior. In this Scope, RBAC and identity failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A resource group is created separately from its workload resources. In this Scope, RBAC and identity failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: A cleanup request could remove shared networking by mistake. In this Scope, RBAC and identity failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A template has hard-coded environment names in several modules. In this Scope, RBAC and identity failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: A service team needs to roll back an API-version update. In this Scope, RBAC and identity failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: A deployment has a dependency cycle across modules. In this Scope, RBAC and identity failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A template should adopt secure defaults without blocking exceptions. In this Scope, RBAC and identity failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: An engineer needs to explain deployment history and correlation IDs. In this Scope, RBAC and identity failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A team is splitting a monolithic template into ownership domains. In this Scope, RBAC and identity failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: A release must support both cloud-hosted and private agents. In this Scope, RBAC and identity failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: An environment has drift that must be reconciled before deployment. In this Scope, RBAC and identity failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A parameter-file change could expose secrets in source control. In this Scope, RBAC and identity failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: A policy assignment blocks an otherwise valid deployment. In this Scope, RBAC and identity failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A stack deletion plan might detach or remove production assets. In this Scope, RBAC and identity failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: A product team is moving a manually configured web workload into version control. In this Scope, RBAC and identity failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: A regulated payment service needs a separate production boundary. In this Scope, RBAC and identity failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A platform team is publishing shared modules for dozens of teams. In this Scope, RBAC and identity failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: An acquisition introduces existing subscriptions and naming rules. In this Scope, RBAC and identity failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A deployment must preserve an existing database and its data. In this Scope, RBAC and identity failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: A pipeline currently uses a long-lived service-principal secret. In this Scope, RBAC and identity failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: A regional rollout needs consistent network and policy baselines. In this Scope, RBAC and identity failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A deployment preview shows unexpected resource replacement. In this Scope, RBAC and identity failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: A team needs per-environment values without copying templates. In this Scope, RBAC and identity failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A resource provider API version changes its required property shape. In this Scope, RBAC and identity failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: An auditor needs reproducible evidence for each infrastructure change. In this Scope, RBAC and identity failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for Scope, RBAC and identity failures. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A development environment must be safely torn down every sprint. Review the production rollout for Scope, RBAC and identity failures. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a Scope, RBAC and identity failures failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: Scope, RBAC and identity failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: Scope, RBAC and identity failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: Scope, RBAC and identity failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: Scope, RBAC and identity failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: Scope, RBAC and identity failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of Scope, RBAC and identity failures in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Next →

Runtime, quota and dependency failures

Hour 9 · Module 5 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses Runtime, quota and dependency failures to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

targetScope = 'subscription'

param location string
param workloadRg string

resource rg 'Microsoft.Resources/resourceGroups@2024-03-01' = {
  name: workloadRg
  location: location
}

module workload './workload.bicep' = {
  name: 'workload'
  scope: rg
  params: { location: location }
}

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns Runtime, quota and dependency failures? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A deployment is close to subscription quota limits. In this Runtime, quota and dependency failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A shared platform module has no clear deprecation policy. In this Runtime, quota and dependency failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: A stack uses deny settings that could block child resource changes. In this Runtime, quota and dependency failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A resource is supported only in selected Azure regions. In this Runtime, quota and dependency failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A team must restore a prior configuration after a faulty change. In this Runtime, quota and dependency failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A deployment uses a Key Vault reference from another subscription. In this Runtime, quota and dependency failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A module output accidentally exposes a sensitive endpoint token. In this Runtime, quota and dependency failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: A new service needs diagnostic, monitoring, and backup coverage. In this Runtime, quota and dependency failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A team is standardizing tags and resource naming in Bicep. In this Runtime, quota and dependency failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A pipeline must separate validation credentials from deployment identity. In this Runtime, quota and dependency failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: A management group deployment needs carefully scoped assignments. In this Runtime, quota and dependency failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A module change passes build but fails at provider validation. In this Runtime, quota and dependency failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: An environment promotion must compare source and target configuration. In this Runtime, quota and dependency failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: A team wants to test snapshots without querying live Azure. In this Runtime, quota and dependency failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A production resource has immutable properties that cannot be replaced. In this Runtime, quota and dependency failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: A module uses experimental features without an upgrade owner. In this Runtime, quota and dependency failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A cost review asks which resources a template owns. In this Runtime, quota and dependency failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: A team needs an audited emergency deployment path. In this Runtime, quota and dependency failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: A public module dependency changes upstream behavior. In this Runtime, quota and dependency failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A resource group is created separately from its workload resources. In this Runtime, quota and dependency failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: A cleanup request could remove shared networking by mistake. In this Runtime, quota and dependency failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A template has hard-coded environment names in several modules. In this Runtime, quota and dependency failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: A service team needs to roll back an API-version update. In this Runtime, quota and dependency failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: A deployment has a dependency cycle across modules. In this Runtime, quota and dependency failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A template should adopt secure defaults without blocking exceptions. In this Runtime, quota and dependency failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: An engineer needs to explain deployment history and correlation IDs. In this Runtime, quota and dependency failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A team is splitting a monolithic template into ownership domains. In this Runtime, quota and dependency failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: A release must support both cloud-hosted and private agents. In this Runtime, quota and dependency failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: An environment has drift that must be reconciled before deployment. In this Runtime, quota and dependency failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A parameter-file change could expose secrets in source control. In this Runtime, quota and dependency failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: A policy assignment blocks an otherwise valid deployment. In this Runtime, quota and dependency failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A stack deletion plan might detach or remove production assets. In this Runtime, quota and dependency failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: A product team is moving a manually configured web workload into version control. In this Runtime, quota and dependency failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: A regulated payment service needs a separate production boundary. In this Runtime, quota and dependency failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A platform team is publishing shared modules for dozens of teams. In this Runtime, quota and dependency failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: An acquisition introduces existing subscriptions and naming rules. In this Runtime, quota and dependency failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A deployment must preserve an existing database and its data. In this Runtime, quota and dependency failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: A pipeline currently uses a long-lived service-principal secret. In this Runtime, quota and dependency failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: A regional rollout needs consistent network and policy baselines. In this Runtime, quota and dependency failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A deployment preview shows unexpected resource replacement. In this Runtime, quota and dependency failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: A team needs per-environment values without copying templates. In this Runtime, quota and dependency failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A resource provider API version changes its required property shape. In this Runtime, quota and dependency failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: An auditor needs reproducible evidence for each infrastructure change. In this Runtime, quota and dependency failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: A shared module has breaking changes planned for a new release. In this Runtime, quota and dependency failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A policy denies public endpoints but a legacy system depends on one. In this Runtime, quota and dependency failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: A team needs separate owners for subscription and workload resources. In this Runtime, quota and dependency failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A failed pipeline leaves a partially completed deployment. In this Runtime, quota and dependency failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: A development environment must be safely torn down every sprint. In this Runtime, quota and dependency failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for Runtime, quota and dependency failures. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A template contains a secret copied from a local parameter file. Review the production rollout for Runtime, quota and dependency failures. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a Runtime, quota and dependency failures failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: Runtime, quota and dependency failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: Runtime, quota and dependency failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: Runtime, quota and dependency failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: Runtime, quota and dependency failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: Runtime, quota and dependency failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of Runtime, quota and dependency failures in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Next →

Pipeline, registry and module failures

Hour 9 · Module 6 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses Pipeline, registry and module failures to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

param keyVaultName string

resource vault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
  name: keyVaultName
}

@secure()
param bootstrapSecret string

output vaultResourceId string = vault.id

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns Pipeline, registry and module failures? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A deployment uses a Key Vault reference from another subscription. In this Pipeline, registry and module failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A module output accidentally exposes a sensitive endpoint token. In this Pipeline, registry and module failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: A new service needs diagnostic, monitoring, and backup coverage. In this Pipeline, registry and module failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A team is standardizing tags and resource naming in Bicep. In this Pipeline, registry and module failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A pipeline must separate validation credentials from deployment identity. In this Pipeline, registry and module failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A management group deployment needs carefully scoped assignments. In this Pipeline, registry and module failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A module change passes build but fails at provider validation. In this Pipeline, registry and module failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: An environment promotion must compare source and target configuration. In this Pipeline, registry and module failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A team wants to test snapshots without querying live Azure. In this Pipeline, registry and module failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A production resource has immutable properties that cannot be replaced. In this Pipeline, registry and module failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: A module uses experimental features without an upgrade owner. In this Pipeline, registry and module failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A cost review asks which resources a template owns. In this Pipeline, registry and module failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: A team needs an audited emergency deployment path. In this Pipeline, registry and module failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: A public module dependency changes upstream behavior. In this Pipeline, registry and module failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A resource group is created separately from its workload resources. In this Pipeline, registry and module failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: A cleanup request could remove shared networking by mistake. In this Pipeline, registry and module failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A template has hard-coded environment names in several modules. In this Pipeline, registry and module failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: A service team needs to roll back an API-version update. In this Pipeline, registry and module failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: A deployment has a dependency cycle across modules. In this Pipeline, registry and module failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A template should adopt secure defaults without blocking exceptions. In this Pipeline, registry and module failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: An engineer needs to explain deployment history and correlation IDs. In this Pipeline, registry and module failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A team is splitting a monolithic template into ownership domains. In this Pipeline, registry and module failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: A release must support both cloud-hosted and private agents. In this Pipeline, registry and module failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: An environment has drift that must be reconciled before deployment. In this Pipeline, registry and module failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A parameter-file change could expose secrets in source control. In this Pipeline, registry and module failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: A policy assignment blocks an otherwise valid deployment. In this Pipeline, registry and module failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A stack deletion plan might detach or remove production assets. In this Pipeline, registry and module failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: A product team is moving a manually configured web workload into version control. In this Pipeline, registry and module failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: A regulated payment service needs a separate production boundary. In this Pipeline, registry and module failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A platform team is publishing shared modules for dozens of teams. In this Pipeline, registry and module failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: An acquisition introduces existing subscriptions and naming rules. In this Pipeline, registry and module failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A deployment must preserve an existing database and its data. In this Pipeline, registry and module failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: A pipeline currently uses a long-lived service-principal secret. In this Pipeline, registry and module failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: A regional rollout needs consistent network and policy baselines. In this Pipeline, registry and module failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A deployment preview shows unexpected resource replacement. In this Pipeline, registry and module failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: A team needs per-environment values without copying templates. In this Pipeline, registry and module failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A resource provider API version changes its required property shape. In this Pipeline, registry and module failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: An auditor needs reproducible evidence for each infrastructure change. In this Pipeline, registry and module failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: A shared module has breaking changes planned for a new release. In this Pipeline, registry and module failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A policy denies public endpoints but a legacy system depends on one. In this Pipeline, registry and module failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: A team needs separate owners for subscription and workload resources. In this Pipeline, registry and module failures drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A failed pipeline leaves a partially completed deployment. In this Pipeline, registry and module failures drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: A development environment must be safely torn down every sprint. In this Pipeline, registry and module failures drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: A production change must pass review before any write operation. In this Pipeline, registry and module failures drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A nested module unexpectedly deploys to the wrong scope. In this Pipeline, registry and module failures drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: A template contains a secret copied from a local parameter file. In this Pipeline, registry and module failures drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A release introduces a naming collision in one environment. In this Pipeline, registry and module failures drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: A central team wants to enforce diagnostic settings consistently. In this Pipeline, registry and module failures drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for Pipeline, registry and module failures. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A deployment stack may delete resources removed from its template. Review the production rollout for Pipeline, registry and module failures. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a Pipeline, registry and module failures failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: Pipeline, registry and module failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: Pipeline, registry and module failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: Pipeline, registry and module failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: Pipeline, registry and module failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: Pipeline, registry and module failures — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of Pipeline, registry and module failures in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Next →

20 troubleshooting cases

Hour 9 · Module 7 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses 20 troubleshooting cases to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

targetScope = 'resourceGroup'

param location string
param environment string

resource workspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
  name: 'law-${environment}'
  location: location
  properties: {
    sku: {
      name: 'PerGB2018'
    }
    retentionInDays: 30
  }
}

output workspaceId string = workspace.id

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns 20 troubleshooting cases? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A management group deployment needs carefully scoped assignments. In this 20 troubleshooting cases drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A module change passes build but fails at provider validation. In this 20 troubleshooting cases drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: An environment promotion must compare source and target configuration. In this 20 troubleshooting cases drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A team wants to test snapshots without querying live Azure. In this 20 troubleshooting cases drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A production resource has immutable properties that cannot be replaced. In this 20 troubleshooting cases drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A module uses experimental features without an upgrade owner. In this 20 troubleshooting cases drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A cost review asks which resources a template owns. In this 20 troubleshooting cases drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: A team needs an audited emergency deployment path. In this 20 troubleshooting cases drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A public module dependency changes upstream behavior. In this 20 troubleshooting cases drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A resource group is created separately from its workload resources. In this 20 troubleshooting cases drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: A cleanup request could remove shared networking by mistake. In this 20 troubleshooting cases drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A template has hard-coded environment names in several modules. In this 20 troubleshooting cases drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: A service team needs to roll back an API-version update. In this 20 troubleshooting cases drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: A deployment has a dependency cycle across modules. In this 20 troubleshooting cases drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A template should adopt secure defaults without blocking exceptions. In this 20 troubleshooting cases drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: An engineer needs to explain deployment history and correlation IDs. In this 20 troubleshooting cases drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A team is splitting a monolithic template into ownership domains. In this 20 troubleshooting cases drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: A release must support both cloud-hosted and private agents. In this 20 troubleshooting cases drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: An environment has drift that must be reconciled before deployment. In this 20 troubleshooting cases drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A parameter-file change could expose secrets in source control. In this 20 troubleshooting cases drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: A policy assignment blocks an otherwise valid deployment. In this 20 troubleshooting cases drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A stack deletion plan might detach or remove production assets. In this 20 troubleshooting cases drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: A product team is moving a manually configured web workload into version control. In this 20 troubleshooting cases drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: A regulated payment service needs a separate production boundary. In this 20 troubleshooting cases drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A platform team is publishing shared modules for dozens of teams. In this 20 troubleshooting cases drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: An acquisition introduces existing subscriptions and naming rules. In this 20 troubleshooting cases drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A deployment must preserve an existing database and its data. In this 20 troubleshooting cases drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: A pipeline currently uses a long-lived service-principal secret. In this 20 troubleshooting cases drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: A regional rollout needs consistent network and policy baselines. In this 20 troubleshooting cases drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A deployment preview shows unexpected resource replacement. In this 20 troubleshooting cases drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: A team needs per-environment values without copying templates. In this 20 troubleshooting cases drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A resource provider API version changes its required property shape. In this 20 troubleshooting cases drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: An auditor needs reproducible evidence for each infrastructure change. In this 20 troubleshooting cases drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: A shared module has breaking changes planned for a new release. In this 20 troubleshooting cases drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A policy denies public endpoints but a legacy system depends on one. In this 20 troubleshooting cases drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: A team needs separate owners for subscription and workload resources. In this 20 troubleshooting cases drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A failed pipeline leaves a partially completed deployment. In this 20 troubleshooting cases drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: A development environment must be safely torn down every sprint. In this 20 troubleshooting cases drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: A production change must pass review before any write operation. In this 20 troubleshooting cases drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A nested module unexpectedly deploys to the wrong scope. In this 20 troubleshooting cases drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: A template contains a secret copied from a local parameter file. In this 20 troubleshooting cases drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A release introduces a naming collision in one environment. In this 20 troubleshooting cases drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: A central team wants to enforce diagnostic settings consistently. In this 20 troubleshooting cases drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: A deployment stack may delete resources removed from its template. In this 20 troubleshooting cases drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A module registry artifact is missing or inaccessible in CI. In this 20 troubleshooting cases drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: A resource is changed manually after a successful deployment. In this 20 troubleshooting cases drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A what-if report contains many no-change and unsupported lines. In this 20 troubleshooting cases drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: A pipeline needs to deploy to multiple subscriptions with OIDC. In this 20 troubleshooting cases drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for 20 troubleshooting cases. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A what-if report contains many no-change and unsupported lines. Review the production rollout for 20 troubleshooting cases. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a 20 troubleshooting cases failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: 20 troubleshooting cases — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: 20 troubleshooting cases — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: 20 troubleshooting cases — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: 20 troubleshooting cases — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: 20 troubleshooting cases — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of 20 troubleshooting cases in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Next →

50 interview questions

Hour 9 · Module 8 · 7 min
BicepAzure Resource ManagerEnglish original · Source of truth for the Chinese translation. Verified against current Microsoft Learn documentation.

Core model

Use evidence-first runbooks for compiler, validation, authorization, deployment and pipeline failures, then rehearse 50 architecture and operations interview questions.

This module uses 50 interview questions to connect language syntax, ARM evaluation, provider behavior and team ownership. Before writing declarations, identify target scope, resource owner, input source, dependency edges, observable evidence and recovery action.

Key principle: Bicep compiles to ARM JSON and Azure Resource Manager orchestrates resource state. Repeatability is not a safety guarantee; API versions, mutability, external dependencies and authorization still require independent review.

Worked Bicep example

param appName string
param location string

resource app 'Microsoft.Web/sites@2023-12-01' = {
  name: appName
  location: location
  kind: 'app,linux'
  properties: { httpsOnly: true }
}

output appHost string = app.properties.defaultHostName

Trace targetScope, parameter provenance, symbolic references, implicit dependencies and output contract. Validate names, API versions and properties against the target environment and current provider schema.

Design review / 设计评审

Review questions: Who owns 50 interview questions? Can callers infer defaults? Are inputs constrained by types? What happens on redeploy, manual drift, concurrent change or retry? Could an immutable property replace production data? How can deployment evidence be retained without exposing secrets?

Self-paced practice: choose one or two clinics; the hour schedule is not intended to complete every prompt.

Architecture clinic 1

Scenario: A module uses experimental features without an upgrade owner. In this 50 interview questions drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 2

Scenario: A cost review asks which resources a template owns. In this 50 interview questions drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 3

Scenario: A team needs an audited emergency deployment path. In this 50 interview questions drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 4

Scenario: A public module dependency changes upstream behavior. In this 50 interview questions drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 5

Scenario: A resource group is created separately from its workload resources. In this 50 interview questions drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 6

Scenario: A cleanup request could remove shared networking by mistake. In this 50 interview questions drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 7

Scenario: A template has hard-coded environment names in several modules. In this 50 interview questions drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 8

Scenario: A service team needs to roll back an API-version update. In this 50 interview questions drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 9

Scenario: A deployment has a dependency cycle across modules. In this 50 interview questions drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 10

Scenario: A template should adopt secure defaults without blocking exceptions. In this 50 interview questions drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 11

Scenario: An engineer needs to explain deployment history and correlation IDs. In this 50 interview questions drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 12

Scenario: A team is splitting a monolithic template into ownership domains. In this 50 interview questions drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 13

Scenario: A release must support both cloud-hosted and private agents. In this 50 interview questions drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 14

Scenario: An environment has drift that must be reconciled before deployment. In this 50 interview questions drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 15

Scenario: A parameter-file change could expose secrets in source control. In this 50 interview questions drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 16

Scenario: A policy assignment blocks an otherwise valid deployment. In this 50 interview questions drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 17

Scenario: A stack deletion plan might detach or remove production assets. In this 50 interview questions drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 18

Scenario: A product team is moving a manually configured web workload into version control. In this 50 interview questions drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 19

Scenario: A regulated payment service needs a separate production boundary. In this 50 interview questions drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 20

Scenario: A platform team is publishing shared modules for dozens of teams. In this 50 interview questions drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 21

Scenario: An acquisition introduces existing subscriptions and naming rules. In this 50 interview questions drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 22

Scenario: A deployment must preserve an existing database and its data. In this 50 interview questions drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 23

Scenario: A pipeline currently uses a long-lived service-principal secret. In this 50 interview questions drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 24

Scenario: A regional rollout needs consistent network and policy baselines. In this 50 interview questions drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 25

Scenario: A deployment preview shows unexpected resource replacement. In this 50 interview questions drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 26

Scenario: A team needs per-environment values without copying templates. In this 50 interview questions drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 27

Scenario: A resource provider API version changes its required property shape. In this 50 interview questions drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 28

Scenario: An auditor needs reproducible evidence for each infrastructure change. In this 50 interview questions drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 29

Scenario: A shared module has breaking changes planned for a new release. In this 50 interview questions drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 30

Scenario: A policy denies public endpoints but a legacy system depends on one. In this 50 interview questions drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 31

Scenario: A team needs separate owners for subscription and workload resources. In this 50 interview questions drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 32

Scenario: A failed pipeline leaves a partially completed deployment. In this 50 interview questions drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 33

Scenario: A development environment must be safely torn down every sprint. In this 50 interview questions drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 34

Scenario: A production change must pass review before any write operation. In this 50 interview questions drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 35

Scenario: A nested module unexpectedly deploys to the wrong scope. In this 50 interview questions drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 36

Scenario: A template contains a secret copied from a local parameter file. In this 50 interview questions drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 37

Scenario: A release introduces a naming collision in one environment. In this 50 interview questions drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 38

Scenario: A central team wants to enforce diagnostic settings consistently. In this 50 interview questions drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 39

Scenario: A deployment stack may delete resources removed from its template. In this 50 interview questions drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 40

Scenario: A module registry artifact is missing or inaccessible in CI. In this 50 interview questions drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 41

Scenario: A resource is changed manually after a successful deployment. In this 50 interview questions drill, the team must compare parameter-file values and prove no secret enters logs. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an annotated change plan and reviewer sign-off. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 42

Scenario: A what-if report contains many no-change and unsupported lines. In this 50 interview questions drill, the team must review what-if replacement/deletion lines against the data owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a reproducible lab branch and validation transcript. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 43

Scenario: A pipeline needs to deploy to multiple subscriptions with OIDC. In this 50 interview questions drill, the team must verify scope and principal permissions before provider preflight. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a decision record with an explicit rejected alternative. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 44

Scenario: A team is migrating a large ARM JSON template incrementally. In this 50 interview questions drill, the team must identify API-version compatibility and the provider schema contract. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a safe recovery checklist with named operational owners. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 45

Scenario: A compliance team needs a time-bounded exception process. In this 50 interview questions drill, the team must define a canary, success signal, abort threshold and rollback owner. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: an evidence bundle with timestamps and correlation identifiers. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 46

Scenario: A deployment is close to subscription quota limits. In this 50 interview questions drill, the team must separate template-owned resources from existing and shared assets. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a set of positive and negative tests for the declared boundary. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 47

Scenario: A shared platform module has no clear deprecation policy. In this 50 interview questions drill, the team must record module version, lock-down source and artifact provenance. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a compatibility note for consumers and a version migration plan. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Architecture clinic 48

Scenario: A stack uses deny settings that could block child resource changes. In this 50 interview questions drill, the team must trace the resource dependency graph and name the owning module. Identify affected resources and owners, observable facts, unknown assumptions and user impact on failure. Explain the chosen scope/parameter/module contract, add one counterexample test and a stop condition. Deliverable: a stop/go gate tied to measurable workload health. A peer reviewer challenges accidental shared-resource deletion, excessive privilege, secret exposure and environment drift.

Deployment and ownership diagram

Git change → Bicep build / lint → validation → what-if review → scoped identity → ARM deployment → resource provider → activity/deployment evidence

Mark credential boundaries, approval ownership, correlation IDs and safe stop points at each transition.

Change sequence

1. Record desired state and affected owners

2. Build/lint locally and review the diff

3. Run validate and what-if at target scope

4. Approve and deploy in stages

5. Check resources, activity log and workload health

6. Retain evidence and rollback decision

Read-only and local commands

az bicep version
az bicep build --file main.bicep
az bicep lint --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep
az deployment group what-if --resource-group <rg> --template-file main.bicep
az deployment group show --resource-group <rg> --name <deployment-name>

Run az account show first to confirm tenant, subscription and principal. Validate and what-if can perform preflight checks and require read access; create/update commands submit writes. Production deployment requires reviewed authorization and change plan.

Guided lab / 指导实验

Goal: deliver an auditable Bicep change for 50 interview questions. (1) Use a sandbox subscription/resource group and confirm caller identity. (2) Copy the sample into a Git branch. (3) express environment differences in parameter files rather than template copies. (4) build, lint and validate. (5) retain what-if output and explain Create/Modify/Delete/NoChange/Ignore line by line. (6) deploy only in the approved lab scope. (7) verify with Azure queries and workload probes. (8) if preview and outcome diverge, stop and retain deployment operations, correlation ID and activity log. Deliver Bicep, sample parameters, preview, verification evidence and rollback note.

Acceptance rubric / 验收标准

Pass only when the template builds, lint findings are dispositioned, parameter and identity boundaries are explicit, what-if has no unexplained destructive change, and deployment output is independently verified.

Production readiness / 生产就绪评审

Scenario: A compliance team needs a time-bounded exception process. Review the production rollout for 50 interview questions. Submit maintenance window, blast radius, change owner, approver, concurrency policy, quota checks, diagnostics/alerts, rollback trigger, data recovery and business communication. Identify template-owned resources versus existing/external dependencies, consequences of delete or detach, and stop gates for API/module upgrade failure.

Failure-mode rehearsal / 故障演练

Run a tabletop for a denied role assignment, provider validation error, partial deployment, unexpected replacement, throttling and a broken health probe. Assign who stops rollout, who gathers evidence, who restores the last known-good declaration and who communicates status.

Evidence-first troubleshooting / 证据优先排错

For a 50 interview questions failure, pause retries and automatic promotion. Record commit, CLI/Bicep versions, tenant/subscription/resource group, deployment name and time. Inspect deployment operations, error code, target resource, correlation ID and Activity Log; classify as compiler/type, ARM preflight, RBAC/policy, provider/quota, dependency/runtime or pipeline artifact issue. Preserve raw responses; never use broad permissions, disabled policy or Complete mode as a generic fix.

Knowledge check / 知识检查

Question 1: 50 interview questions — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 2: 50 interview questions — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 3: 50 interview questions — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 4: 50 interview questions — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Question 5: 50 interview questions — what evidence should an engineer inspect before changing the template?

State scope, intended state, authorization, API version, dependencies, preview and verification; include observable evidence and rollback conditions.

Instructor narration / 讲师讲解提纲

Explain the business value of 50 interview questions in five minutes. Ask learners to identify state ownership, then draw inputs, resource graph, authorization path and verification evidence. Have a peer act as change approver and challenge destructive differences, secret handling and rollback ownership. Each learner closes with one verified fact, one assumption and one sandbox-safe validation.

Hour check →

20 Troubleshooting Cases / 20 个排错案例

Troubleshooting case 1: Compile fails

Symptom: Unexpected token, invalid decorator, or unresolved module path.
Safe diagnostic: Run build with diagnostics, confirm compiler version, inspect the exact file/line and resolve syntax/type errors before Azure access.

Troubleshooting case 2: Linter blocks CI

Symptom: A rule reports a secure-parameter or naming violation.
Safe diagnostic: Read rule code, config severity and suppression scope; fix the template or document a narrow approved suppression with owner/expiry.

Troubleshooting case 3: Module restore fails

Symptom: Private registry artifact cannot be found or pulled.
Safe diagnostic: Verify registry alias, repository path, immutable version tag, ACR role assignment and agent network/DNS access.

Troubleshooting case 4: Validate denies

Symptom: ARM preflight returns authorization failure.
Safe diagnostic: Confirm tenant/subscription and deployment scope; distinguish deployment operation permission from individual provider reads and writes.

Troubleshooting case 5: What-if shows Delete

Symptom: A resource is predicted to be removed or replaced.
Safe diagnostic: Stop promotion; verify name, condition, API version and immutable properties against the live resource and data owner.

Troubleshooting case 6: Wrong scope

Symptom: Resource is created at subscription rather than resource-group scope.
Safe diagnostic: Inspect targetScope, module scope expression and deployment command; check deployment record before retrying.

Troubleshooting case 7: Key Vault reference fails

Symptom: Secret retrieval is denied or resolves from an unexpected vault.
Safe diagnostic: Check deployment identity, vault tenant/subscription, secret URI/version and Key Vault authorization mode; never paste values into logs.

Troubleshooting case 8: Role assignment fails

Symptom: Role assignment creation returns authorization or principal-not-found.
Safe diagnostic: Check caller has roleAssignments/write at scope, correct principal object ID, propagation and whether the identity exists in target tenant.

Troubleshooting case 9: Provider registration failure

Symptom: Resource type is not available in the target subscription.
Safe diagnostic: Check namespace registration, subscription policy, region/service availability and exact provider error; do not assume template syntax is invalid.

Troubleshooting case 10: Quota exceeded

Symptom: Provider reports a regional or SKU quota limit.
Safe diagnostic: Inspect usage and limit in target subscription/region; request quota or choose a reviewed SKU before retrying.

Troubleshooting case 11: Dependency ordering error

Symptom: A resource starts before the referenced resource is ready.
Safe diagnostic: Use symbolic property references for implicit dependencies; add explicit dependsOn only for real ordering not otherwise represented.

Troubleshooting case 12: Existing resource not found

Symptom: An existing declaration resolves to no resource.
Safe diagnostic: Confirm scope, case-sensitive name, resource ID, subscription, provider type and deployment identity read access.

Troubleshooting case 13: Loop name collision

Symptom: A loop creates duplicate names or resource IDs.
Safe diagnostic: Validate input uniqueness and deterministic naming with a local test; avoid index-based production identity unless stable.

Troubleshooting case 14: Unexpected no-op

Symptom: Deployment reports no change but desired settings are absent.
Safe diagnostic: Check condition, module scope, parameter file and resource ownership; compare deployed template and effective resource properties.

Troubleshooting case 15: Partial deployment

Symptom: Some resources succeed and a later provider operation fails.
Safe diagnostic: Review deployment operations in time order, identify successful side effects and dependencies, then use a scoped corrective deployment.

Troubleshooting case 16: Deployment stack deletion risk

Symptom: Update preview may detach or delete an unmanaged resource.
Safe diagnostic: Inspect actionOnUnmanage and deny settings; review the complete resource list and obtain owner approval before any destructive action.

Troubleshooting case 17: OIDC login fails

Symptom: Pipeline cannot obtain an Azure token.
Safe diagnostic: Verify federated credential issuer, subject, audience, repo/environment claim, tenant and service connection identity.

Troubleshooting case 18: Wrong subscription in CI

Symptom: A successful deployment targets an unexpected subscription.
Safe diagnostic: Assert tenant and subscription IDs in pipeline logs and guard deployment with an explicit allowlist before authentication.

Troubleshooting case 19: Secret leak in logs

Symptom: A parameter value appears in a pipeline log or artifact.
Safe diagnostic: Revoke/rotate the credential, restrict artifact access, remove it from future outputs and switch to secure parameters/Key Vault references.

Troubleshooting case 20: Rollback not safe

Symptom: Prior deployment state cannot restore deleted or migrated data.
Safe diagnostic: Treat infrastructure rollback separately from data recovery; restore from tested backup and rehearse forward-fix where rollback is unsafe.

50 Interview Questions / 50 道面试题

Architecture, language, security, delivery and recovery.

Question 1: Explain the design choice and an alternative you rejected. Focus: Bicep model and ARM lifecycle.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 2: What evidence proves the deployment is safe at the target scope? Focus: Bicep model and ARM lifecycle.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 3: How do you prevent a secret or privileged credential from leaking? Focus: Bicep model and ARM lifecycle.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 4: How would you stage the rollout and decide when to stop? Focus: Bicep model and ARM lifecycle.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 5: How do you recover if the deployment partially succeeds? Focus: Bicep model and ARM lifecycle.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 6: Explain the design choice and an alternative you rejected. Focus: parameters and type system.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 7: What evidence proves the deployment is safe at the target scope? Focus: parameters and type system.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 8: How do you prevent a secret or privileged credential from leaking? Focus: parameters and type system.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 9: How would you stage the rollout and decide when to stop? Focus: parameters and type system.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 10: How do you recover if the deployment partially succeeds? Focus: parameters and type system.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 11: Explain the design choice and an alternative you rejected. Focus: resource graph and dependencies.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 12: What evidence proves the deployment is safe at the target scope? Focus: resource graph and dependencies.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 13: How do you prevent a secret or privileged credential from leaking? Focus: resource graph and dependencies.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 14: How would you stage the rollout and decide when to stop? Focus: resource graph and dependencies.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 15: How do you recover if the deployment partially succeeds? Focus: resource graph and dependencies.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 16: Explain the design choice and an alternative you rejected. Focus: module interface and registry.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 17: What evidence proves the deployment is safe at the target scope? Focus: module interface and registry.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 18: How do you prevent a secret or privileged credential from leaking? Focus: module interface and registry.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 19: How would you stage the rollout and decide when to stop? Focus: module interface and registry.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 20: How do you recover if the deployment partially succeeds? Focus: module interface and registry.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 21: Explain the design choice and an alternative you rejected. Focus: deployment scope and identity.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 22: What evidence proves the deployment is safe at the target scope? Focus: deployment scope and identity.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 23: How do you prevent a secret or privileged credential from leaking? Focus: deployment scope and identity.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 24: How would you stage the rollout and decide when to stop? Focus: deployment scope and identity.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 25: How do you recover if the deployment partially succeeds? Focus: deployment scope and identity.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 26: Explain the design choice and an alternative you rejected. Focus: secrets and policy.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 27: What evidence proves the deployment is safe at the target scope? Focus: secrets and policy.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 28: How do you prevent a secret or privileged credential from leaking? Focus: secrets and policy.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 29: How would you stage the rollout and decide when to stop? Focus: secrets and policy.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 30: How do you recover if the deployment partially succeeds? Focus: secrets and policy.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 31: Explain the design choice and an alternative you rejected. Focus: testing and what-if.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 32: What evidence proves the deployment is safe at the target scope? Focus: testing and what-if.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 33: How do you prevent a secret or privileged credential from leaking? Focus: testing and what-if.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 34: How would you stage the rollout and decide when to stop? Focus: testing and what-if.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 35: How do you recover if the deployment partially succeeds? Focus: testing and what-if.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 36: Explain the design choice and an alternative you rejected. Focus: pipeline and production operations.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 37: What evidence proves the deployment is safe at the target scope? Focus: pipeline and production operations.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 38: How do you prevent a secret or privileged credential from leaking? Focus: pipeline and production operations.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 39: How would you stage the rollout and decide when to stop? Focus: pipeline and production operations.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 40: How do you recover if the deployment partially succeeds? Focus: pipeline and production operations.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 41: Explain the design choice and an alternative you rejected. Focus: deployment stacks and lifecycle.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 42: What evidence proves the deployment is safe at the target scope? Focus: deployment stacks and lifecycle.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 43: How do you prevent a secret or privileged credential from leaking? Focus: deployment stacks and lifecycle.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 44: How would you stage the rollout and decide when to stop? Focus: deployment stacks and lifecycle.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 45: How do you recover if the deployment partially succeeds? Focus: deployment stacks and lifecycle.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Question 46: Explain the design choice and an alternative you rejected. Focus: troubleshooting and communication.

Clarify owner, scope, desired state and alternatives; relate language constructs to ARM deployment behavior.

Question 47: What evidence proves the deployment is safe at the target scope? Focus: troubleshooting and communication.

Use build/lint, validation, what-if, deployed properties, deployment operations and workload health as separate evidence.

Question 48: How do you prevent a secret or privileged credential from leaking? Focus: troubleshooting and communication.

Use secure parameters or Key Vault references with a federated/managed identity; never emit values or store long-lived secrets.

Question 49: How would you stage the rollout and decide when to stop? Focus: troubleshooting and communication.

Use a sandbox canary, explicit approval gate, measured health, bounded concurrency and documented rollback owner.

Question 50: How do you recover if the deployment partially succeeds? Focus: troubleshooting and communication.

Inspect operation history and correlation ID; preserve evidence, reconcile successful side effects and choose tested restore or forward-fix.

Hour knowledge check / 课时综合检查

1. Describe the ARM deployment lifecycle and explain what Bicep compiles to.

Bicep compiles declarative source to ARM JSON; ARM evaluates the deployment at the declared scope, calls resource providers and records operations.

2. How do parameter types and decorators make an environment contract safer?

Use typed inputs, allowed values and secure decorators where appropriate; keep environment differences in parameter files and review provenance.

3. When is an implicit dependency enough, and when is dependsOn justified?

A symbolic reference creates an implicit dependency when one resource consumes another output; use dependsOn only for ordering without a data reference.

4. What belongs in a reusable module interface and how should its version evolve?

Keep a small typed parameter/output contract, minimize hidden side effects, pin registry versions and document breaking-change migration.

5. How do targetScope, module scope and deployment identity interact?

The root targetScope constrains deployment scope; child modules can target supported scopes, but the caller identity needs permissions at every target.

6. How do you supply secrets without embedding or logging secret values?

Use secure parameters or supported Key Vault parameter references with a least-privilege deployment identity; avoid defaults, outputs and logs containing secrets.

7. What does each of build, lint, validate, what-if and snapshot testing establish?

Build checks compilation, lint checks configured style/security rules, validate runs ARM preflight, what-if predicts change and snapshots compare normalized local representations.

8. How do you gate a federated pipeline and recover from a partial release?

Use workload identity federation, scoped environments, reviewed what-if, canary health gates and a named rollback owner; inspect operations before retrying.

Field checklist / 实战清单

  1. Triage from source to Azure operation: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.
  2. Compiler, type and linter diagnostics: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.
  3. ARM validation and provider failures: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.
  4. Scope, RBAC and identity failures: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.
  5. Runtime, quota and dependency failures: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.
  6. Pipeline, registry and module failures: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.
  7. 20 troubleshooting cases: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.
  8. 50 interview questions: build, lint, review scope, validate, inspect what-if, deploy only after approval, verify and retain evidence.

Official Microsoft Learn references

Check current CLI, Bicep and resource API versions before applying examples.