AZ-400 Question 152
Select 2You have a YAML-based Azure DevOps pipeline that deploys to three environments: Dev, QA, and Production. Your security policy requires that the QA team must manually approve deployments to the QA environment before the pipeline proceeds. Which two actions must you take to ensure a manual approval check is applied to the QA environment?
- A
A. Configure a Manual approval check under the QA environment's Approvals and checks settings in Azure DevOps.
- B
B. Add a 'Manual Intervention' YAML task in the QA stage of the pipeline to request manual input from the QA team.
- C
C. Reference the QA environment by name in the pipeline� YAML so that the environment checks are enforced during deployment.
- D
D. Enable the 'Require stage checks to pass' option in the pipeline's Trigger settings.
Show answer and explanation
Correct answers: A, C
Explanation
In a YAML-based pipeline that uses Azure DevOps environments, you configure checks and approvals in the environment's Approvals and checks settings. To enforce a manual approval, you must name the environment in the YAML pipeline (e.g., environment: 'QA') and then add a Manual approval in the 'QA' environment configuration. This approach aligns with Microsoft� documentation on environment-based approvals for YAML pipelines, ensuring that the pipeline pauses and requests approval before proceeding.
- A. Correct.
A. CORRECT. In Azure DevOps, you configure the manual approval check under �Environment → Approvals and checks.� This ensures the pipeline waits for approval before deployment.
- B. Incorrect.
B. INCORRECT. Although you could add a Manual Intervention task in classical release pipelines, for YAML-based environments, approvals are handled through the environment's Approvals and checks, not a dedicated intervention task in YAML.
- C. Correct.
C. CORRECT. Referencing the QA environment by name in the YAML pipeline (for example, environment: 'QA') is essential so that the environment� manual approval check is triggered.
- D. Incorrect.
D. INCORRECT. The 'Require stage checks to pass' toggle does not directly insert a manual approval step. You must specifically configure an approval check for the environment.