AZ-104 exam dumps

AZ-104 practice question 126 of 289

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

AZ-104 Question 126

Single answer

You are an Azure Administrator for a company that has multiple environments (development, testing, and production) for a web application. You have a Bicep file that declares and configures the required Azure resources. You want to ensure that environment-specific settings can be applied without modifying the main Bicep file. Which approach should you prioritize?

  1. A

    Place environment-based values in inline variables within the Bicep file

  2. B

    Use separate parameter files and link them during deployment

  3. C

    Rely on environment-specific conditional statements inside the same Bicep file

  4. D

    Manually apply environment differences by editing the Bicep file before each deployment

Show answer and explanation

Correct answer: B

Explanation

By referencing separate parameter files, you can keep the main Bicep file reusable across environments while applying environment-specific settings in parameter files. This approach is more maintainable, reduces errors, and aligns well with best practices for ARM Template/Bicep deployments.

  • A. Incorrect.

    Embedding environment-specific values directly in the Bicep file can lead to confusion and requires changes to the core file whenever an environment setting updates

  • B. Correct.

    Using parameter files for each environment helps maintain a single Bicep file and simplifies deployments across different environments

  • C. Incorrect.

    Including large conditional logic within a single Bicep file can become difficult to manage and obscure the deployment strategy for different environments

  • D. Incorrect.

    Manually editing the Bicep file introduces the risk of human error and makes it harder to maintain consistency across multiple environments

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