AZ-104 exam dumps

AZ-104 practice question 129 of 289

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

AZ-104 Question 129

Select 2

You have deployed several Azure resources, including a virtual machine, storage account, and virtual network, through the Azure portal. You now want to replicate this setup in another subscription. To ensure you can manage and modify the configuration as code, you decide to export the template of the current deployment and then convert it into a Bicep file. Which two actions are required for this process?

  1. A

    Open the resource group's Export template option in the Azure portal, download the generated JSON template file, and save it locally

  2. B

    Directly select Export to Bicep from the resource group's settings in the Azure portal to generate a Bicep file

  3. C

    Use the Azure CLI command 'az bicep decompile --file <exportedTemplate.json>' to convert the downloaded ARM template to a Bicep file

  4. D

    Edit the downloaded JSON file manually to insert valid Bicep DSL syntax and rename it with a .bicep extension

Show answer and explanation

Correct answers: A, C

Explanation

To export an existing deployment as an ARM template, use the 'Export template' feature in the Azure portal. This generates a JSON file that describes your resource configuration. Afterwards, use the 'az bicep decompile' CLI command to convert the downloaded JSON file into a Bicep file, ensuring you have a clean Bicep configuration ready for future deployments.

  • A. Correct.

    You can export the existing deployment as a JSON-based ARM template from the Azure portal by selecting 'Export template' and downloading the file

  • B. Incorrect.

    There is no direct 'Export to Bicep' option available in the Azure portal; you must export to ARM JSON first

  • C. Correct.

    You should use the Azure CLI bicep 'decompile' command to convert an existing ARM JSON template into a Bicep file

  • D. Incorrect.

    Manually editing a JSON template to insert Bicep DSL syntax is not required or recommended; the bicep CLI can automatically convert JSON to Bicep

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