You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Bicep files can only be exported from the Azure portal. Exporting via Azure CLI or Azure PowerShell is not supported at this time.
13
+
Currently, Bicep files can only be exported from the Azure portal. However, you can export ARM JSON templates via [Azure CLI](../templates/export-template-cli.md) or [Azure PowerShell](../templates/export-template-powershell.md) and then [decompile](./decompile.md) them into to Bicep files.
To export one or more resources from a resource group:
22
22
@@ -26,15 +26,15 @@ To export one or more resources from a resource group:
26
26
27
27
:::image type="content" source="./media/export-bicep-portal/select-all-resources.png" alt-text="Screenshot of selecting all resources for export in Azure portal.":::
28
28
29
-
1. Select **Export template** from the top menu. The **Export template** from the left menu exports all the resources in the group to a template.
29
+
1. Select **Export template** from the top menu. The **Export template** from the left menu exports all the resources in the group to a Bicep file.
30
30
31
-
1. The exported template is displayed, and is available to download and deploy.
31
+
1.Select **Bicep**. The exported Bicep file is displayed, and is available to download and deploy.
32
32
33
-
:::image type="content" source="./media/export-bicep-portal/show-template.png" alt-text="Screenshot of the displayed exported template in Azure portal.":::
33
+
:::image type="content" source="./media/export-bicep-portal/show-template.png" alt-text="Screenshot of the displayed exported Bicep file in Azure portal.":::
34
34
35
-
**Include parameters** is selected by default. When selected, all template parameters are included when the template is generated. If you’d like to author your own parameters, toggle this checkbox to not include them.
35
+
All template parameters are included when the Bicep file is generated.
36
36
37
-
## Export template from a resource
37
+
## Export Bicep file from a resource
38
38
39
39
To export one resource:
40
40
@@ -46,28 +46,14 @@ To export one resource:
46
46
47
47
:::image type="content" source="./media/export-bicep-portal/export-single-resource.png" alt-text="Screenshot of exporting a single resource in Azure portal.":::
48
48
49
-
1. The exported template is displayed, and is available to download and deploy. The template only contains the single resource. **Include parameters** is selected by default. When selected, all template parameters are included when the template is generated. If you’d like to author your own parameters, toggle this checkbox to not include them.
49
+
1.Select **Bicep**. The exported template is displayed, and is available to download and deploy. The Bicep file only contains the single resource. All template parameters are included when the Bicep file is generated.
50
50
51
51
## Export template after deployment
52
52
53
-
You can export the template that was used to deploy existing resources. The template you get is exactly the one that was used for deployment.
54
-
55
-
1. Select the resource group you want to export.
56
-
57
-
1. Select the link under **Deployments**.
58
-
59
-
:::image type="content" source="./media/export-bicep-portal/select-deployment-history.png" alt-text="Screenshot of selecting deployment history in Azure portal.":::
60
-
61
-
1. Select one of the deployments from the deployment history.
62
-
63
-
:::image type="content" source="./media/export-bicep-portal/select-details.png" alt-text="Screenshot of selecting a specific deployment from deployment history in Azure portal.":::
64
-
65
-
1. Select **Template**. The template used for this deployment is displayed, and is available for download.
66
-
67
-
:::image type="content" source="./media/export-bicep-portal/show-template-from-history.png" alt-text="Screenshot of selecting the template used for a specific deployment in Azure portal.":::
53
+
You can export the template that was used to deploy existing resources. The template you get is exactly the one that was used for deployment. This option can only export ARM JSON templates. After exporting, you can [decompile](./decompile.md) them into to Bicep files.
68
54
69
55
## Next steps
70
56
71
-
* Learn how to export templates with [Azure CLI](export-template-cli.md), [Azure PowerShell](export-template-powershell.md), or [REST API](/rest/api/resources/resourcegroups/exporttemplate).
72
-
*To learn the Resource Manager template syntax, see [Understand the structure and syntax of Azure Resource Manager templates](./syntax.md).
73
-
*To learn how to develop templates, see the [step-by-step tutorials](../index.yml).
57
+
* Learn how to export ARM JSON templates with [Azure CLI](../templates/export-template-cli.md), [Azure PowerShell](../templates/export-template-powershell.md), or [REST API](/rest/api/resources/resourcegroups/exporttemplate).
58
+
*Learn the [Bicep file structure and syntax](./file.md).
59
+
*Learn how to [decompile ARM JSON tempaltes to Bicep](./decompile.md).
Copy file name to clipboardExpand all lines: includes/resource-manager-export-template-choose-option.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
author: mumian
3
3
ms.service: azure-resource-manager
4
4
ms.topic: include
5
-
ms.date: 10/25/2024
5
+
ms.date: 02/14/2025
6
6
ms.author: jgao
7
7
---
8
8
@@ -12,7 +12,7 @@ There are two ways to export a template:
12
12
13
13
***Export from resource group or resource**. This option generates a new template from existing resources. The exported template is a "snapshot" of the current state of the resource group. You can export an entire resource group or specific resources within that resource group.
14
14
15
-
***Save from history**. This option retrieves an exact copy of a template used for deployment. You specify the deployment from the deployment history.
15
+
***Save from history**. This option supports exporting only ARM JSON templates. It retrieves an exact copy of the template used for deployment, allowing you to select a specific deployment from the deployment history.
16
16
17
17
Depending on the option you choose, the exported templates have different qualities.
Copy file name to clipboardExpand all lines: includes/resource-manager-export-template-intro.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
author: mumian
3
3
ms.service: azure-resource-manager
4
4
ms.topic: include
5
-
ms.date: 10/25/2024
5
+
ms.date: 02/14/2025
6
6
ms.author: jgao
7
7
---
8
8
9
-
To assist with creating Azure Resource Manager templates, you can export a template from existing resources. The exported template helps you understand the JSON syntax and properties that deploy your resources. To automate future deployments, start with the exported template and modify it for your scenario. The export template process attempts to create a usable template. However, most exported templates require some modifications before they can be used to deploy Azure resources.
9
+
To assist with creating Azure Resource Manager templates, you can export a template from existing resources as either a [Bicep file](../articles/azure-resource-manager/bicep/overview.md) or an [ARM JSON template](../articles/azure-resource-manager/templates/overview.md). The exported template helps you understand the syntax and properties needed for resource deployment. To streamline future deployments, use the exported template as a starting point and customize it for your needs. While the export process generates a functional template, most exported templates require adjustments before they can be used for deployment.
10
10
11
-
Resource Manager enables you to pick one or more resources for exporting to a template. You can focus on exactly the resources you need in the template.
11
+
Resource Manager enables you to pick one or more resources for exporting to a template. You can focus on exactly the resources you need in the template.
0 commit comments