AZ-400 exam dumps

AZ-400 practice question 149 of 306

Designing and Implementing Microsoft DevOps Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-400 Question 149

Select 2

Your team maintains several pipelines in Azure DevOps for deploying a web application to multiple environments. You want to standardize and re-use the same build and deployment tasks across these pipelines while also centrally managing environment-specific variables. Which two actions should you implement to achieve these goals?

  1. A

    Create a YAML template with common build and deployment tasks and reference it from each pipeline.

  2. B

    Use an Azure DevOps variable group to manage shared environment variables and secrets.

  3. C

    Store environment-specific secrets in a text file within your repository for easy reference.

  4. D

    Create separate identical pipelines for each environment to avoid confusion about shared configurations.

Show answer and explanation

Correct answers: A, B

Explanation

Azure DevOps supports reusability through YAML templates and centralized management of configuration via variable groups. See Microsoft Documentation on templates (https://learn.microsoft.com/azure/devops/pipelines/process/templates) and on managing variables and variable groups (https://learn.microsoft.com/azure/devops/pipelines/library/variable-groups) for best practices in creating and maintaining reusable pipeline elements.

  • A. Correct.

    Option 1: Correct. YAML templates let you define repeatable tasks or stages that can be referenced by multiple pipelines. This improves consistency and maintainability by having a single source of truth for commonly used steps.

  • B. Correct.

    Option 2: Correct. Variable groups store environment-specific and shared variables in one place, reducing duplication and simplifying updates. Secrets can also be securely managed within variable groups or linked from Azure Key Vault.

  • C. Incorrect.

    Option 3: Incorrect. Storing sensitive data in plain text in a code repository is insecure. Azure DevOps variable groups or Azure Key Vault references are the recommended approaches for handling secrets securely.

  • D. Incorrect.

    Option 4: Incorrect. Creating separate pipelines that duplicate tasks increases maintenance overhead and risks inconsistencies. Leveraging YAML templates and variable groups remains a more efficient and maintainable approach.

Timed practice exam

Take a AZ-400 practice test under exam conditions

70 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam