AZ-104 exam dumps

AZ-104 practice question 128 of 289

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

AZ-104 Question 128

Single answer

You are an Azure Administrator at Contoso. You have an existing resource group with a web app and a storage account deployed through the Azure portal. Your DevOps team needs to replicate these resources in another subscription and manage them as Infrastructure as Code. Which approach best allows you to export the current deployment as an ARM template and then convert it to a Bicep file for future use?

  1. A

    Export the deployment as a template from the Azure portal, then run 'az bicep decompile' to generate the Bicep file.

  2. B

    Use Azure Resource Graph Explorer to automatically generate a Bicep file from existing deployments.

  3. C

    Run 'bicep build' on the existing live deployment to create a Bicep file without needing an ARM template.

  4. D

    Manually recreate the resources within a new Bicep file by inspecting settings in the Azure portal.

Show answer and explanation

Correct answer: A

Explanation

To easily manage and replicate a deployed environment, you can export an existing deployment as an ARM template and then convert that JSON template into a Bicep file using 'az bicep decompile'. This preserves the resource definitions and provides a straightforward path to adopt Infrastructure as Code practices.

  • A. Correct.

    Exporting from the portal provides an ARM template JSON file, and the 'az bicep decompile' command in Azure CLI converts that JSON into a Bicep file.

  • B. Incorrect.

    Azure Resource Graph is useful for querying resources, but it does not convert them into Bicep templates automatically.

  • C. Incorrect.

    'bicep build' generates ARM templates (JSON) from existing Bicep files, not the other way around, so it won't directly create a Bicep file from a live deployment.

  • D. Incorrect.

    Manually recreating resources by hand is time-consuming and prone to errors, and does not leverage the export or decompile tooling.

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