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
# Quickstart: Use MSBuild to convert Bicep to JSON
12
12
13
-
Learn the process of utilizing [MSBuild](/visualstudio/msbuild/msbuild) for the conversion of Bicep files to Azure Resource Manager JSON templates (ARM templates). Additionally, MSBuild can be utilized for the conversion of [Bicep parameter files](./parameter-files.md?tabs=Bicep) to [Azure Resource Manager parameter files](../templates/parameter-files.md) with the NuGet packages version 0.23.x or later. The provided examples demonstrate the use of MSBuild from the command line with C# project files for the conversion. These project files serve as examples that can be utilized in an MSBuild continuous integration (CI) pipeline.
13
+
Learn the process of utilizing [MSBuild](/visualstudio/msbuild/msbuild) for the conversion of Bicep files to Azure Resource Manager JSON templates (ARM templates). Additionally, MSBuild can be utilized for the conversion of [Bicep parameters files](./parameter-files.md?tabs=Bicep) to [Azure Resource Manager parameters files](../templates/parameter-files.md) with the NuGet packages version 0.23.x or later. The provided examples demonstrate the use of MSBuild from the command line with C# project files for the conversion. These project files serve as examples that can be utilized in an MSBuild continuous integration (CI) pipeline.
14
14
15
15
## Prerequisites
16
16
@@ -29,7 +29,7 @@ In certain environments, using a single package feed helps prevent problems aris
29
29
30
30
## MSBuild tasks and Bicep packages
31
31
32
-
From your continuous integration (CI) pipeline, you can use MSBuild tasks and CLI packages to convert Bicep files and Bicep parameter files into JSON. The functionality relies on the following NuGet packages:
32
+
From your continuous integration (CI) pipeline, you can use MSBuild tasks and CLI packages to convert Bicep files and Bicep parameters files into JSON. The functionality relies on the following NuGet packages:
33
33
34
34
| Package Name | Description |
35
35
| ---- |---- |
@@ -118,7 +118,7 @@ The latest NuGet package versions match the latest [Bicep CLI](./bicep-cli.md) v
118
118
119
119
### Project file examples
120
120
121
-
The following examples show how to configure C# console application project files for converting Bicep files and Bicep parameter files to JSON. Replace `__LATEST_VERSION__` with the latest version of the [Bicep NuGet packages](https://www.nuget.org/packages/Azure.Bicep.Core/) in the following examples. See [MSBuild tasks and Bicep packages](#msbuild-tasks-and-bicep-packages) for finding the latest version.
121
+
The following examples show how to configure C# console application project files for converting Bicep files and Bicep parameters files to JSON. Replace `__LATEST_VERSION__` with the latest version of the [Bicep NuGet packages](https://www.nuget.org/packages/Azure.Bicep.Core/) in the following examples. See [MSBuild tasks and Bicep packages](#msbuild-tasks-and-bicep-packages) for finding the latest version.
122
122
123
123
#### SDK-based example
124
124
@@ -277,7 +277,7 @@ Use the classic example only if the previous examples don't work for you. In thi
277
277
278
278
## Convert Bicep to JSON
279
279
280
-
These examples demonstrate the conversion of a Bicep file and a Bicep parameter file to JSON using MSBuild. Start by creating a project file for .NET, .NET Core 3.1, or the Classic framework. Then, generate the Bicep file and the Bicep parameter file before running MSBuild.
280
+
These examples demonstrate the conversion of a Bicep file and a Bicep parameters file to JSON using MSBuild. Start by creating a project file for .NET, .NET Core 3.1, or the Classic framework. Then, generate the Bicep file and the Bicep parameters file before running MSBuild.
281
281
282
282
### Create project
283
283
@@ -402,7 +402,7 @@ You need a Bicep file and a BicepParam file to be converted to JSON.
402
402
403
403
### Run MSBuild
404
404
405
-
Run MSBuild to convert the Bicep file and the Bicep parameter file to JSON.
405
+
Run MSBuild to convert the Bicep file and the Bicep parameters file to JSON.
406
406
407
407
1. Open a Visual Studio Code terminal session.
408
408
1. In the PowerShell session, go to the folder that contains the project file. For example, the _C:\msBuildDemo_ directory.
- To learn about the available properties for parameters, see [Understand the structure and syntax of Bicep files](file.md).
295
-
- To learn about passing in parameter values as a file, see [Create a Bicep parameter file](parameter-files.md).
295
+
- To learn about passing in parameter values as a file, see [Create a Bicep parameters file](parameter-files.md).
296
296
- To learn about providing parameter values at deployment, see [Deploy with Azure CLI](./deploy-cli.md), and [Deploy with Azure PowerShell](./deploy-powershell.md).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/quickstart-create-bicep-use-visual-studio-code.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
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Create Bicep files - Visual Studio Code
3
3
description: Use Visual Studio Code and the Bicep extension to Bicep files for deploy Azure resources.
4
-
ms.date: 12/04/2024
4
+
ms.date: 12/06/2024
5
5
ms.topic: quickstart
6
6
ms.custom: mode-ui, devx-track-bicep
7
7
#Customer intent: As a developer new to Azure deployment, I want to learn how to use Visual Studio Code to create and edit Bicep files so that I can use them to deploy Azure resources.
@@ -256,9 +256,9 @@ The visualizer shows the resources defined in the Bicep file with the resource d
256
256
257
257
:::image type="content" source="./media/quickstart-create-bicep-use-visual-studio-code/vscode-bicep-deploy-resource-group-locations.png" alt-text="Screenshot of resource group location options.":::
258
258
259
-
1. From **Select a parameter file**, select **None**.
259
+
1. From **Select a parameters file**, select **None**.
260
260
261
-
:::image type="content" source="./media/quickstart-create-bicep-use-visual-studio-code/vscode-bicep-deploy-select-parameter-file.png" alt-text="Screenshot of Select parameter file.":::
261
+
:::image type="content" source="./media/quickstart-create-bicep-use-visual-studio-code/vscode-bicep-deploy-select-parameter-file.png" alt-text="Screenshot of Select parameters file.":::
262
262
263
263
It takes a few moments to create the resources. For more information, see [Deploy Bicep files with Visual Studio Code](./deploy-vscode.md).
When you deploy your Azure resources by using a pipeline, you need to take care to handle your secrets appropriately.
192
192
193
-
- Avoid storing secrets in your code repository. For example, don't add secrets to parameter files, or to your pipeline definition YAML files.
193
+
- Avoid storing secrets in your code repository. For example, don't add secrets to parameters files or to your pipeline definition YAML files.
194
194
- In GitHub Actions, use [encrypted secrets](https://docs.github.com/actions/security-guides/encrypted-secrets) to store secure data. Use [secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning) to detect any accidental commits of secrets.
195
195
- In Azure Pipelines, use [secret variables](/azure/devops/pipelines/process/variables#secret-variables) to store secure data.
0 commit comments