Microsoft DevOps Engineer Expert AZ-400 Practice Question
You are defining an infrastructure-as-code (IaC) strategy for an Azure landing zone that is provisioned with Bicep templates stored in an Azure Repos Git repository. The solution must meet the following requirements:
A single set of template files must be promoted through dev, test, and prod so that every environment is created from exactly the same code base.
Template syntax validation and linting tests must run automatically on every pull request (PR).
Deployments to an environment must occur only after the corresponding branch is updated by an approved PR.
Which approach should you recommend?
Implement GitFlow: create long-lived develop, release, and master branches that each hold a copy of the templates, and trigger separate pipelines on every push to deploy the respective environment.
Create three separate Git repositories-one per environment-with identical templates, and configure independent pipelines that run tests and deploy on every commit to each repository's default branch.
Adopt trunk-based development with a single main branch containing shared Bicep templates and environment-specific parameter files, and configure a multi-stage YAML pipeline that runs PR validation tests and then, on merge to main, deploys sequentially to dev, test, and prod using environment approvals.
Use release-flow with a main branch for prod, short-lived release branches for dev and test, and trigger deployments only when a semantic-version tag is pushed to any branch.
Trunk-based development keeps one authoritative branch that contains the template code for every environment, ensuring all environments are created from the same files. A multi-stage YAML pipeline triggered by a pull-request validation build enforces automated linting and syntax checks before the code is merged. After the PR is approved and the main branch is updated, the same pipeline automatically proceeds to the dev, test, and prod deployment stages in sequence, each guarded by branch protection, environment checks, and approvals. The other options either duplicate templates across multiple long-lived branches or repositories-violating requirement 1-or deploy automatically on every push without the PR gate required in requirement 3.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is trunk-based development?
Open an interactive chat with Bash
What is a multi-stage YAML pipeline in Azure DevOps?
Open an interactive chat with Bash
How do environment approvals work in Azure DevOps pipelines?
Open an interactive chat with Bash
What is trunk-based development?
Open an interactive chat with Bash
What is a multi-stage YAML pipeline in Azure DevOps?
Open an interactive chat with Bash
How does pull-request validation ensure code quality?
Open an interactive chat with Bash
Microsoft DevOps Engineer Expert AZ-400
Design and implement build and release pipelines
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .