Skip to content

Commit fdf793c

Browse files
Merge pull request #250738 from mumian/0908-az-bicepparam
add az bicepparam support
2 parents 3ecf8d9 + a3ddf89 commit fdf793c

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep CLI commands and overview
33
description: Describes the commands that you can use in the Bicep CLI. These commands include building Azure Resource Manager templates from Bicep.
44
ms.topic: conceptual
55
ms.custom: devx-track-azurecli, devx-track-bicep, devx-track-arm-template
6-
ms.date: 06/20/2023
6+
ms.date: 09/08/2023
77
---
88

99
# Bicep CLI commands
@@ -12,9 +12,6 @@ This article describes the commands you can use in the Bicep CLI. You have two o
1212

1313
This article shows how to run the commands in Azure CLI. When running through Azure CLI, you start the commands with `az`. If you're not using Azure CLI, run the commands without `az` at the start of the command. For example, `az bicep build` becomes `bicep build`, and `az bicep version` becomes `bicep --version`.
1414

15-
> [!NOTE]
16-
> The commands related to the Bicep parameters files are exclusively supported within the Bicep CLI and are not currently available in Azure CLI. These commands include: `build-params`, `decompile-params`, and `generate-params`.
17-
1815
## build
1916

2017
The `build` command converts a Bicep file to an Azure Resource Manager template (ARM template). Typically, you don't need to run this command because it runs automatically when you deploy a Bicep file. Run it manually when you want to see the ARM template JSON that is created from your Bicep file.
@@ -69,7 +66,7 @@ To use the `--no-restore` switch, you must have Bicep CLI version **0.4.1008 or
6966
The `build-params` command builds a _.bicepparam_ file into a JSON parameters file.
7067

7168
```azurecli
72-
bicep build-params params.bicepparam
69+
az bicep build-params --file params.bicepparam
7370
```
7471

7572
This command converts a _params.bicepparam_ parameters file into a _params.json_ JSON parameters file.
@@ -91,7 +88,7 @@ For more information about using this command, see [Decompiling ARM template JSO
9188
The `decompile-params` command decompile a JSON parameters file to a _.bicepparam_ parameters file.
9289

9390
```azurecli
94-
bicep decompile-params azuredeploy.parameters.json --bicep-file ./dir/main.bicep
91+
az bicep decompile-params -- file azuredeploy.parameters.json --bicep-file ./dir/main.bicep
9592
```
9693

9794
This command decompiles a _azuredeploy.parameters.json_ parameters file into a _azuredeploy.parameters.bicepparam_ file. `-bicep-file` specifies the path to the Bicep file (relative to the .bicepparam file) that is referenced in the `using` declaration.
@@ -101,13 +98,13 @@ This command decompiles a _azuredeploy.parameters.json_ parameters file into a _
10198
The `generate-params` command builds a parameters file from the given Bicep file, updates if there's an existing parameters file.
10299

103100
```azurecli
104-
bicep generate-params main.bicep --output-format bicepparam --include-params all
101+
az bicep generate-params --file main.bicep --output-format bicepparam --include-params all
105102
```
106103

107104
The command creates a Bicep parameters file named _main.bicepparam_. The parameter file contains all parameters in the Bicep file, whether configured with default values or not.
108105

109106
```azurecli
110-
bicep generate-params main.bicep --outfile main.parameters.json
107+
az bicep generate-params --file main.bicep --outfile main.parameters.json
111108
```
112109

113110
The command creates a parameter file named _main.parameters.json_. The parameter file only contains the parameters without default values configured in the Bicep file.
@@ -140,6 +137,8 @@ The command returns an array of available versions.
140137

141138
```azurecli
142139
[
140+
"v0.20.4",
141+
"v0.19.5",
143142
"v0.18.4",
144143
"v0.17.1",
145144
"v0.16.2",
@@ -167,9 +166,7 @@ The command returns an array of available versions.
167166
"v0.4.1124",
168167
"v0.4.1008",
169168
"v0.4.613",
170-
"v0.4.451",
171-
"v0.4.412",
172-
"v0.4.63"
169+
"v0.4.451"
173170
]
174171
```
175172

@@ -264,7 +261,7 @@ az bicep version
264261
The command shows the version number.
265262

266263
```azurecli
267-
Bicep CLI version 0.4.1008 (223b8d227a)
264+
Bicep CLI version 0.20.4 (c9422e016d)
268265
```
269266

270267
To call this command directly through the Bicep CLI, use:

0 commit comments

Comments
 (0)