AZ-104 exam dumps

AZ-104 practice question 127 of 289

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

AZ-104 Question 127

Single answer

Your organization has deployed a set of Azure resources using the Azure Portal for a new project. You need to replicate the same infrastructure setup across multiple environments. Leadership has asked you to provide both an ARM template and a Bicep file for the existing deployment. Which approach should you take to achieve this with minimal effort?

  1. A

    Navigate to the resource group's Deployments blade, select the desired deployment, export the template, and use 'bicep decompile' on the downloaded JSON file.

  2. B

    Create a new Bicep file from scratch by manually typing each resource definition and then generate an ARM template using an Azure CLI command.

  3. C

    Use the Azure CLI command 'az bicep convert' directly on the existing live resources without downloading any template files.

  4. D

    Export the entire resource group to a PowerShell script in the Azure Portal and then manually translate the script into a JSON template.

Show answer and explanation

Correct answer: A

Explanation

Exporting the template from the existing deployment and using the 'bicep decompile' command afterward provides a straightforward workflow. Azure natively allows you to export a JSON-based template from the resource group's deployment history. Once you have the JSON file, the Bicep CLI can convert it into a Bicep file, making it easier to maintain and reuse the infrastructure definition.

  • A. Correct.

    Exporting the template from the Deployments blade and then running 'bicep decompile' is the recommended and easiest approach to generate both the ARM template (already provided by Azure) and a Bicep file.

  • B. Incorrect.

    Manually creating a new Bicep file from scratch might be time-consuming and prone to errors; it's more efficient to convert an existing template than to author everything from the ground up.

  • C. Incorrect.

    There is no 'az bicep convert' command that can convert live Azure resources directly into Bicep without going through an ARM template file first.

  • D. Incorrect.

    Exporting a resource group as a PowerShell script in the Portal is possible, but it does not automatically yield a JSON ARM template that can be easily converted to a Bicep file.

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