Stopping a Multi-Region Deployment as Soon as One Region Fails
You have a multi-stage pipeline that deploys to multiple regions. You want to ensure that if the deployment to one region fails, the pipeline does not proceed to the next region. What is the best way to implement this?
Quick Answer
Chaining stages with dependsOn and a condition: succeeded() on each region's stage is what stops a multi-region rollout the instant one region fails — each stage only proceeds if the region before it deployed successfully, so a failure anywhere in the chain naturally halts progression to every remaining region.
⚠ Common exam trap
Many exam-takers confuse manual approvals (Option B) with automatic failure handling, not realizing that approvals only pause for human input and do not inherently stop the pipeline on a deployment failure.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Define stage dependencies with 'dependsOn' and set 'condition' to 'succeeded()'.
Azure Pipelines allows you to define stage dependencies using 'dependsOn' and control execution flow with 'condition'. By setting each region deployment as a separate stage that depends on the previous region's stage succeeding (condition: 'succeeded()'), the pipeline will automatically halt if any region deployment fails, preventing progression to subsequent regions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use pipeline decorators to inject error handling steps.
Why it's wrong here
Pipeline decorators inject mandatory steps across all pipelines organisation-wide, but they cannot express stage-to-stage run conditions. The requirement is satisfied by stage dependencies, where each region stage declares dependsOn the previous one, so a failed region halts progression. Decorators suit enforcing compliance checks globally, not sequencing stages.
- ✗
Add a manual approval between regions.
Why it's wrong here
Manual approvals pause a stage until a human grants permission; they do not evaluate whether the prior region's deployment succeeded. Stage dependencies with the default succeeded condition automatically block downstream stages on failure. Approvals are the right choice when a person must authorise promotion, such as release gates before production.
- ✗
Configure each region deployment as a separate stage with no dependencies.
Why it's wrong here
Removing dependencies lets every region stage start concurrently, so a failure in one region cannot stop the others. The scenario needs sequential gating, achieved by declaring dependsOn between region stages. Independent parallel stages are correct when regions must deploy simultaneously and no ordering or failure propagation is wanted.
- ✓
Define stage dependencies with 'dependsOn' and set 'condition' to 'succeeded()'.
Why this is correct
Setting `dependsOn` with `condition: succeeded()` makes each regional stage run only when every preceding dependency completed successfully, so a failed region halts downstream stages. This directly satisfies the stem's requirement that the pipeline must not proceed to the next region after a failure, using native YAML stage gating rather than manual checks.
Go deeper
Related to this question
Learn chapter
Managing Build Quality and Package Dependencies
Key term
Azure Pipelines
Azure Pipelines is a cloud-based CI/CD service from Microsoft that automatically builds, tests, and deploys code to any platform or cloud.
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 696 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on AZ-400
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Your release pipeline deploys to multiple Azure regions. You need to ensure that if a deployment to one region fails, the pipeline continues deploying to other regions. Which deployment strategy should you use?
medium- A.Immutable deployment
- ✓ B.Rolling deployment
- C.Blue-green deployment
- D.Canary deployment
Why B: Rolling deployment updates instances gradually across regions. If a deployment to one region fails, the pipeline can continue deploying to other regions because each region is updated independently. Option A (immutable deployment) replaces all instances at once, so a failure would halt the entire deployment. Option C (blue-green) switches all traffic to a new environment; if that environment fails, the whole deployment fails. Option D (canary) routes a small percentage of traffic to a new version and rolls back if issues occur, but it does not ensure continued deployment to other regions upon failure.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.