Microsoft AZ-400 (Designing and Implementing Microsoft DevOps Solutions) Practice Test 17

Question 160

A deployment step must run only if its dependencies have succeeded, not after a failed verification job. Which condition reflects that policy?

  1. Use a condition checking succeeded()
  2. Use a variable group for shared environment settings
  3. Use secret pipeline variables for confidential values
  4. Use parameters for typed pipeline input

Explanation

Correct Answer

A:

The succeeded() expression evaluates execution status and gates work on successful prerequisite completion. A failed upstream job prevents this step from proceeding under the success-only condition.

Incorrect Answers

B:

Variable groups centralize named variables for authorized pipelines, with optional secret integration and access controls; it contributes to shared pipeline configuration, with success-dependent execution still requiring its own control.

C:

Secret variables store sensitive settings outside checked-in YAML and require controlled injection into task environments; this solves runtime secret injection, leaving success-dependent execution unresolved.

D:

YAML runtime parameters support explicit types and are resolved at template parsing, enabling safer structural customization than string variables; this option addresses typed reusable pipeline configuration rather than addressing success-dependent execution.

Question 161

A team wants daily integration into one releasable mainline even while unfinished functionality remains invisible to customers. Which TWO practices should be combined? Choose TWO.

  1. Adopt trunk-based development with small integrations
  2. Merge an integration branch while preserving its history
  3. Maintain a release branch for supported fixes
  4. Use a hotfix branch from the production revision
  5. Use feature flags for incomplete trunk work

Explanation

Correct Answers

A:

Trunk-based development relies on frequent small merges to a shared mainline, often shielding unfinished functionality behind flags.

E:

Feature flags gate runtime behavior independently from source integration, permitting frequent merges before release exposure.

Incorrect Answers

B:

A merge commit can preserve branch topology and the context of integrating a completed branch; here minimizing branch divergence is the target, not retained branch integration topology.

C:

A release branch isolates version-specific stabilization and hotfixes without freezing ongoing development on main; although that supports parallel supported version maintenance, this scenario calls for minimizing branch divergence.

D:

Branching from the deployed release commit isolates an urgent correction from unrelated unshipped changes; minimizing branch divergence cannot be inferred from production-specific patch isolation alone.

Question 162

Governance rules change often and teams want the rules reviewed with version history before enforcement. Which operational pattern suits this?

  1. Use environment expiration or cleanup automation
  2. Use policy-as-code in deployment pipelines
  3. Maintain legacy Azure Automation State Configuration while planning migration
  4. Model infrastructure dependencies declaratively
  5. Use configuration-as-code in source control
  6. Publish environment definitions in a catalog

Explanation

Correct Answer

B:

Policy-as-code captures machine-readable guardrails in version control and automates validation during delivery.

Incorrect Answers

A:

Automated teardown or time-to-live policies remove short-lived environments once they are no longer required; that changes bounded ephemeral environment lifetime without delivering versioned infrastructure policy definitions.

C:

Azure Automation State Configuration manages existing DSC node assignments; Microsoft has announced retirement in September 2027 and recommends transition to Azure Machine Configuration; versioned infrastructure policy definitions falls outside the scope of legacy DSC node assignment with migration.

D:

Declarative resource graphs encode dependencies and let the deployment engine schedule prerequisites before dependent resources; it contributes to dependency-aware desired infrastructure, with versioned infrastructure policy definitions still requiring its own control.

E:

Storing configuration definitions in Git enables history, review, and automated validation like application code; this solves auditable machine configuration changes, leaving versioned infrastructure policy definitions unresolved.

F:

ADE catalogs contain approved environment definitions and deployment configuration; their contents should be preserved for migration before the service retires; this option addresses approved environment template selection rather than addressing versioned infrastructure policy definitions.

Question 163

Templates compile successfully but frequently produce resources outside permitted regions. Which governance layer can deny noncompliant deployments?

  1. Use managed identity for IaC execution
  2. Define Azure resources declaratively with Bicep
  3. Use Azure Policy to check IaC outcomes
  4. Use template validation before deploying resources
  5. Use a reusable module registry for Bicep
  6. Use what-if before infrastructure deployment

Explanation

Correct Answer

C:

Azure Policy evaluates configured resource compliance and can deny changes that violate assigned policy definitions.

Incorrect Answers

A:

Federated or managed workload identities enable Azure authentication without embedding reusable credential secrets in source or task configuration; enforcement of Azure resource guardrails remains outside the responsibility of credentialless deployment identity.

B:

Bicep provides concise declarative Azure resource definitions compiled into Azure Resource Manager deployments; that acts on Azure-native declarative provisioning, whereas the requested outcome is enforcement of Azure resource guardrails.

D:

Template compilation and validation detect authoring errors before deployment attempts affect live resources; here enforcement of Azure resource guardrails is the target, not predeployment declarative syntax checking.

E:

A supported Bicep module registry publishes reusable modules with explicit version references for consuming templates; although that supports centrally versioned IaC component sharing, this scenario calls for enforcement of Azure resource guardrails.

F:

ARM what-if previews intended resource-state differences from a template without applying those changes; enforcement of Azure resource guardrails cannot be inferred from preapply infrastructure delta inspection alone.

Question 164

An IaC pipeline should reject malformed Bicep references and invalid template expressions before touching a subscription. Which step is appropriate?

  1. Use managed identity for IaC execution
  2. Use deployment scopes for governance
  3. Use Azure Policy to check IaC outcomes
  4. Define Azure resources declaratively with Bicep
  5. Use template validation before deploying resources

Explanation

Correct Answer

E:

Template compilation and validation detect authoring errors before deployment attempts affect live resources. Validation is a predeployment gate; it checks the template and arguments without creating the declared Azure resources.

Incorrect Answers

A:

Federated or managed workload identities enable Azure authentication without embedding reusable credential secrets in source or task configuration; predeployment declarative syntax checking cannot be delivered through credentialless deployment identity.

B:

Bicep and ARM deployments support appropriate target scopes, with authorization and resources matched to management or subscription hierarchy; its effect is nonresource-group IaC target, not predeployment declarative syntax checking.

C:

Azure Policy evaluates configured resource compliance and can deny changes that violate assigned policy definitions; that changes enforcement of Azure resource guardrails without delivering predeployment declarative syntax checking.

D:

Bicep provides concise declarative Azure resource definitions compiled into Azure Resource Manager deployments; Azure-native declarative provisioning cannot substitute for predeployment declarative syntax checking.

Question 165

An external audit service receives every work item edit but needs notifications only on newly created items of a particular type. Which integration setting should change?

  1. Filter service-hook subscriptions by event
  2. Use Azure DevOps work item mentions
  3. Subscribe a Teams channel to Azure DevOps activity
  4. Subscribe a Teams channel to GitHub events

Explanation

Correct Answer

A:

Event type and available subscription filters narrow Azure DevOps service-hook traffic before payload delivery.

Incorrect Answers

B:

Mentioning a colleague in a work item comment notifies that person and preserves discussion context with the tracked work; it handles contextual backlog discussion notification but cannot by itself deliver event selection before webhook dispatch.

C:

Azure DevOps integrations and service-hook subscriptions can send supported project events to Microsoft Teams for shared visibility; event selection before webhook dispatch remains outside the responsibility of DevOps-to-Teams event distribution.

D:

GitHub integration with Microsoft Teams surfaces repository activity in a selected channel based on subscription configuration; that acts on GitHub-to-Teams collaboration events, whereas the requested outcome is event selection before webhook dispatch.

Question 166

A common build template accepts either a signing step list or an empty list according to the consuming project. Which YAML capability fits?

  1. Use template insertion for optional steps
  2. Pass environment-specific data through parameters
  3. Avoid expanding secrets into compile-time templates
  4. Use a required template environment check

Explanation

Correct Answer

A:

Template insertion can splice parameterized steps into the compiled pipeline while preserving the template's ordered structure.

Incorrect Answers

B:

Explicit parameters separate environment configuration from the common deployment logic, avoiding copied YAML definitions; the distinction is controlled variation of a shared workflow versus optional compile-time step expansion.

C:

Runtime secret variables or Key Vault retrieval keep sensitive values out of source-controlled template expansion and minimize accidental disclosure; optional compile-time step expansion cannot be delivered through separating secrets from YAML compilation.

D:

The required template check evaluates whether a pipeline follows an approved extending template before a protected resource is used; its effect is enforced shared template adoption, not optional compile-time step expansion.

Question 167

Business stakeholders want a message only when the production deployment stage fails, not every time a developer pushes. What should the automation filter?

  1. Send deployment status via pipeline notifications
  2. Use Azure DevOps work item mentions
  3. Filter service-hook subscriptions by event
  4. Use Azure Boards team dashboards

Explanation

Correct Answer

A:

Notifications triggered on deployment-stage outcomes avoid confusing development activity with production release status.

Incorrect Answers

B:

Mentioning a colleague in a work item comment notifies that person and preserves discussion context with the tracked work; this solves contextual backlog discussion notification, leaving production failure event targeting unresolved.

C:

Event type and available subscription filters narrow Azure DevOps service-hook traffic before payload delivery; this option addresses event selection before webhook dispatch rather than addressing production failure event targeting.

D:

Team dashboards group widgets for an Azure DevOps team's work and delivery context, keeping operational views aligned to team scope; it handles team-specific delivery visibility but cannot by itself deliver production failure event targeting.

Question 168

A desired-state template for a VM contains a production password in plain text committed to source. Which configuration practice must change?

  1. Model infrastructure dependencies declaratively
  2. Maintain legacy Azure Automation State Configuration while planning migration
  3. Separate secrets from configuration templates
  4. Use configuration-as-code in source control

Explanation

Correct Answer

C:

Configuration code should reference protected secret delivery rather than embedding sensitive values in reusable templates.

Incorrect Answers

A:

Declarative resource graphs encode dependencies and let the deployment engine schedule prerequisites before dependent resources; here safe parameterization of infrastructure secrets is the target, not dependency-aware desired infrastructure.

B:

Azure Automation State Configuration manages existing DSC node assignments; Microsoft has announced retirement in September 2027 and recommends transition to Azure Machine Configuration; although that supports legacy DSC node assignment with migration, this scenario calls for safe parameterization of infrastructure secrets.

D:

Storing configuration definitions in Git enables history, review, and automated validation like application code; the distinction is auditable machine configuration changes versus safe parameterization of infrastructure secrets.

Question 169

A pipeline must create and update infrastructure but must not grant Azure roles to other identities. Which permission distinction is important?

  1. Assign only data-plane access for Key Vault secret retrieval
  2. Use a system-assigned managed identity for one Azure resource
  3. Use least-privilege role assignment instead of Owner
  4. Scope service principal RBAC at the resource group

Explanation

Correct Answer

C:

Contributor can manage most resources without Azure role-assignment powers that broader access-administration roles may grant.

Incorrect Answers

A:

Key Vault data-plane roles or access policies grant secret retrieval without general resource management authority; secret-read without infrastructure administration cannot substitute for deployment without RBAC delegation.

B:

A system-assigned managed identity is tied to the lifecycle of one Azure resource and can obtain Entra tokens without stored passwords; deployment without RBAC delegation falls outside the scope of resource-lifecycle-bound workload identity.

D:

Azure RBAC assigned to the deployment identity at the target resource group limits actions to that scope and inherited children; this solves resource-group-bounded deployment privilege, leaving deployment without RBAC delegation unresolved.

Question 170

Developers can merge even when PR checks fail due to broad bypass grants; governance requires only emergency custodians to override. Which permission should be restricted?

  1. Limit repository bypass policy rights
  2. Use Stakeholder access for limited work tracking
  3. Use a project team for backlog ownership
  4. Separate access level from security permissions

Explanation

Correct Answer

A:

Bypass policy rights allow exceptional merges or pushes and should be assigned only to tightly controlled operators.

Incorrect Answers

B:

Stakeholder access provides a limited set of Azure DevOps features focused on work tracking rather than full developer capabilities; low-privilege business work access concerns a different control point than exceptional branch-policy override.

C:

Project teams have backlog settings and area/iteration associations that organize work tracking within a shared project; here exceptional branch-policy override is the target, not team-specific Boards configuration.

D:

Access level controls feature entitlements while repository and branch permissions govern actions on specific project resources; although that supports distinction between entitlement and permission, this scenario calls for exceptional branch-policy override.

Designing and Implementing Microsoft DevOps Solutions (AZ-400) Practice Tests