AZ-104 exam dumps

AZ-104 practice question 114 of 289

Microsoft Certified: Azure Administrator Associate. Associate level, Microsoft. Free question with the correct answer and a full explanation.

AZ-104 Question 114

Single answer

You manage an Azure environment where you need to deploy identical sets of resources (App Service, SQL Database, and Storage Account) to multiple environments (development, test, production). You want to minimize the amount of repeated code in your templates while allowing each environment to use distinct configuration parameters. Which approach is the most appropriate?

  1. A

    Create one large ARM template that includes all environment definitions and directly references environment-specific settings

  2. B

    Use modules or linked templates to group repeated resource definitions, then pass environment-specific parameters when deploying

  3. C

    Generate separate parameter files for each resource, without including reusable resource code blocks

  4. D

    Duplicate the resource definitions across different environment templates to keep them clearly separated

Show answer and explanation

Correct answer: B

Explanation

Bicep modules or linked ARM templates enable you to encapsulate reusable resource definitions. By passing environment parameters (e.g., SKU, location) into shared code blocks, you reduce duplication and maintain consistency across different environments.

  • A. Incorrect.

    This approach leads to a very large template and intertwines environment settings directly, making it hard to maintain differences across environments

  • B. Correct.

    Using modules (in Bicep) or linked templates (in ARM) allows you to reuse the same code for identical resources, while passing different parameters for each environment

  • C. Incorrect.

    This method only addresses parameter differences but does not centralize the resource definitions into reusable building blocks

  • D. Incorrect.

    Duplicating resource definitions across multiple templates can lead to significant maintenance overhead when changes are required

Timed practice exam

Take a AZ-104 practice test under exam conditions

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

Start timed exam