Skip to content

Commit 0ffbe94

Browse files
authored
Merge pull request #191899 from joshuawaddell/bicep-migrate
Added reference to Import Resource and updated images
2 parents ae2a97c + cfebfb9 commit 0ffbe94

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
575 Bytes
Loading

articles/azure-resource-manager/bicep/migrate.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes the recommended workflow when migrating Azure resources a
44
author: joshuawaddell
55
ms.author: jowaddel
66
ms.topic: conceptual
7-
ms.date: 09/09/2021
7+
ms.date: 03/16/2022
88
---
99
# Migrate to Bicep
1010

@@ -14,7 +14,7 @@ When you have existing JSON Azure Resource Manager templates (ARM templates) and
1414

1515
:::image type="content" source="./media/migrate/five-phases.png" alt-text="Diagram of the five phases for migrating Azure resources to Bicep: convert, migrate, refactor, test, and deploy." border="false":::
1616

17-
The first step in the process is to capture your Azure resources as a JSON file, if one doesn't already exist. You then decompile the JSON file to an initial Bicep file, which you improve upon by refactoring. When you have a working file, you test and deploy using a process that minimizes the risk of breaking changes to your Azure environment.
17+
The first step in the process is to capture an initial representation of your Azure resources. If required, you then decompile the JSON file to an initial Bicep file, which you improve upon by refactoring. When you have a working file, you test and deploy using a process that minimizes the risk of breaking changes to your Azure environment.
1818

1919
:::image type="content" source="./media/migrate/migrate-bicep.png" alt-text="Diagram of the recommended workflow for migrating Azure resources to Bicep." border="false":::
2020

@@ -26,9 +26,12 @@ In the _convert_ phase of migrating your resources to Bicep, the goal is to capt
2626

2727
The convert phase consists of two steps, which you complete in sequence:
2828

29-
1. **Capture a JSON representation of your Azure resources.** If you have an existing JSON template that you're converting to Bicep, the first step is easy - you already have your source template. If you're converting Azure resources deployed through the portal or another tool, you need to *export* the resource definitions and then convert them to Bicep. You can use the Azure portal, Azure CLI, and Azure PowerShell cmdlets to export single resources, multiple resources, and entire resource groups.
29+
1. **Capture a representation of your Azure resources.** If you have an existing JSON template that you're converting to Bicep, the first step is easy - you already have your source template. If you're converting Azure resources that were deployed by using the portal or another tool, you need to capture the resource definitions. You can capture a JSON representation of your resources using the Azure portal, Azure CLI, or Azure PowerShell cmdlets to *export* single resources, multiple resources, and entire resource groups. You can use the **Import Resource** command within Visual Studio Code to import a Bicep representation of your Azure resource.
3030

31-
1. **Convert the JSON representation to Bicep using the _decompile_ command.** [The Bicep tooling includes the `decompile` command to convert templates.](decompile.md) You can invoke the `decompile` command from either the Azure CLI, or from the Bicep CLI. The decompilation process is a best-effort process and doesn't guarantee a full mapping from JSON to Bicep. You may need to revise the generated Bicep file to meet your template best practices before using the file to deploy resources.
31+
1. **If required, convert the JSON representation to Bicep using the _decompile_ command.** [The Bicep tooling includes the `decompile` command to convert templates.](decompile.md) You can invoke the `decompile` command from either the Azure CLI, or from the Bicep CLI. The decompilation process is a best-effort process and doesn't guarantee a full mapping from JSON to Bicep. You may need to revise the generated Bicep file to meet your template best practices before using the file to deploy resources.
32+
33+
> [!NOTE]
34+
> You can import a resource by opening the Visual Studio Code command palette. Use <kbd>Ctrl+Shift+P</kbd> on Windows and Linux and <kbd>⌘+Shift+P</kbd> on macOS.
3235
3336
## Phase 2: Migrate
3437

@@ -71,7 +74,7 @@ The deploy phase consists of eight steps, which you complete in any order:
7174

7275
In the _test_ phase of migrating your resources to Bicep, the goal is to verify the integrity of your migrated templates and to perform a test deployment.
7376

74-
The test phase consists of two steps:, which you complete in sequence:
77+
The test phase consists of two steps, which you complete in sequence:
7578

7679
1. **Run the ARM template deployment what-if operation.** To help you verify your converted templates before deployment, you can use the [Azure Resource Manager template deployment what-if operation](../templates/deploy-what-if.md). It compares the current state of your environment with the desired state that is defined in the template. The tool outputs the list of changes that will occur *without* applying the changes to your environment. You can use what-if with both incremental and complete mode deployments. Even if you plan to deploy your template using incremental mode, it's a good idea to run your what-if operation in complete mode.
7780

0 commit comments

Comments
 (0)