AZ-104 exam dumps

AZ-104 practice question 113 of 289

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

AZ-104 Question 113

Single answer

You are an Azure administrator for an organization that needs to deploy a multi-tier application environment repeatedly. The environment consists of a web app, an Azure SQL database, and a storage account. The solution must ensure the resources use consistent settings while allowing different configurations (like dev, test, and production) with minimal changes in a single Bicep file. Which approach should you use to achieve this goal?

  1. A

    Define parameters and variables in the Bicep file to dynamically configure resource settings

  2. B

    Use parameters and outputs in the Bicep file for all resource definitions

  3. C

    Create multiple resource modules in the same file without parameters for each environment

  4. D

    Embed conditions directly within each resource definition to switch environments

Show answer and explanation

Correct answer: A

Explanation

Parameters enable you to provide environment-specific values (like naming conventions and resource sizes), and variables allow for reusing expressions or computed values within the template. This approach ensures that a single Bicep file can be easily adapted for different environments without hard-coding settings in multiple locations.

  • A. Correct.

    Using parameters allows for different environment-specific values, and variables help reuse computed values or expressions across resources

  • B. Incorrect.

    Outputs do not replace variables for within-template reuse; they primarily return data from the deployment

  • C. Incorrect.

    Multiple resource modules without parameters would not allow easy customization for different environments

  • D. Incorrect.

    Embedding conditions in every resource definition can be overly complex and does not facilitate simple configuration changes

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