Courseiva
Design and implement build and release pipelinesmediumMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

Your team is adopting Infrastructure as Code (IaC) using Bicep. You need to validate the Bicep file syntax and run pre-deployment checks as part of the build pipeline. Which task should you use?

⚠ Common exam trap

Many candidates confuse build-time syntax validation with deployment-time validation, leading them to choose the Azure Resource Group Deployment task (Option A) because it can deploy Bicep files, but it does not perform isolated syntax checks in the build phase.

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

Azure CLI task with 'az bicep build'

The `az bicep build` command compiles a Bicep file into an ARM template and performs syntax validation, making it the correct choice for validating Bicep syntax and running pre-deployment checks in a build pipeline. This task ensures that the Bicep code is syntactically correct before any deployment attempt, aligning with Infrastructure as Code (IaC) best practices.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Azure Resource Group Deployment task

    Why it's wrong here

    The Azure Resource Group Deployment task is designed to deploy an ARM template or Bicep file to a resource group, not to validate syntax in isolation. While it compiles Bicep as part of the deployment, the validation is coupled with the deployment action and may fail only after provisioning attempts or policy checks, making it unsuitable for pre-commit syntax validation.

  • Terraform task

    Why it's wrong here

    The Terraform task is for HashiCorp's Terraform configuration language (HCL), not for Bicep. It cannot parse or validate Bicep files because Bicep is a separate domain-specific language for Azure Resource Manager, so using this task would not provide any Bicep syntax checking.

  • PowerShell task with Invoke-RestMethod

    Why it's wrong here

    PowerShell's Invoke-RestMethod is a generic HTTP client with no built-in understanding of Bicep syntax. It could only call external endpoints manually, but there is no native command or parser in PowerShell to validate Bicep files, so this approach lacks any built-in validation capability.

  • Azure CLI task with 'az bicep build'

    Why this is correct

    The Azure CLI task with 'az bicep build' is the correct choice because this command compiles a Bicep file into an ARM template and reports any syntax errors during the build process. It serves as the official, built-in mechanism for validating Bicep syntax in a pipeline.

About these practice questions

Courseiva writes every AZ-400 question from scratch — 823 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 →

How Courseiva writes practice questions · Editorial policy

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.