Courseiva
Design and implement build and release pipelinesmediumMultiple ChoiceObjective-mapped

Setting packageForLinux to Force Kudu-Based ZIP Deployment

You have a multi-stage YAML pipeline that deploys to a Linux-based Azure App Service. The pipeline uses a 'Deploy to Azure App Service' task. You need to ensure that the deployment uses the Kudu REST API with ZIP deployment. Which value should you set for the 'packageForLinux' task input?

Quick Answer

Setting the 'packageForLinux' input to true is what forces the 'Deploy to Azure App Service' task to use the Kudu REST API with ZIP deployment — this matters because Linux-based App Service doesn't support WebDeploy/MSDeploy at all, so ZIP deployment through Kudu is the only supported path for that target.

⚠ Common exam trap

Many exam-takers confuse the 'packageForLinux' input with a generic 'enableKudu' switch, not realizing that Kudu is the underlying mechanism for ZIP deployment on Linux and that this specific input is required to activate it.

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

Set 'packageForLinux' to true

The 'packageForLinux' input must be set to 'true' to force the 'Deploy to Azure App Service' task to use the Kudu REST API with ZIP deployment when targeting a Linux-based Azure App Service. This is required because Linux App Services do not support WebDeploy (MSDeploy) and rely on the Kudu endpoint for ZIP-based deployments.

Answer analysis

Option-by-option breakdown

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

  • Set 'enableCustomDeployment' to true

    Why it's wrong here

    This enables custom deployment scripts, not specifically ZIP deployment via Kudu for Linux.

  • Set 'useWebDeploy' to false

    Why it's wrong here

    This disables Web Deploy, but does not enable ZIP deployment for Linux.

  • Set 'enableKuduDeploy' to true

    Why it's wrong here

    There is no such input 'enableKuduDeploy' in the Azure Web App task.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-400 exam frequently reuses these exact scenarios with slightly different constraints.

Set 'packageForLinux' to trueCorrect answer
Set 'enableCustomDeployment' to trueWrong answer — click to see why

Why this is wrong here

This enables custom deployment scripts, not specifically ZIP deployment via Kudu for Linux.

Set 'useWebDeploy' to falseWrong answer — click to see why

Why this is wrong here

This disables Web Deploy, but does not enable ZIP deployment for Linux.

Set 'enableKuduDeploy' to trueWrong answer — click to see why

Why this is wrong here

There is no such input 'enableKuduDeploy' in the Azure Web App task.

Analysis generated from the official AZ-400blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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 team uses a multi-stage YAML pipeline to build and deploy a .NET Core application. The build stage runs successfully, but the deployment to a Linux web app fails with an error indicating that the Kudu service cannot start because the startup command is missing. What is the most likely cause?

medium
  • A.The pipeline is missing the 'AzureWebApp@1' task with a 'StartupCommand' parameter.
  • B.The service connection lacks permission to access the web app.
  • C.The web app is configured with a Windows runtime stack.
  • D.The build output does not include the web.config file.

Why A: The Kudu service on Linux web apps requires a startup command to launch the .NET Core application. The 'AzureWebApp@1' task's 'StartupCommand' parameter specifies this command (e.g., 'dotnet myapp.dll'). Without it, Kudu cannot start the process, causing the deployment 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.