az bicep

Bicep CLI command group.

Commands

az bicep build

Build a Bicep file.

az bicep decompile

Attempt to decompile an ARM template file to a Bicep file.

az bicep install

Install Bicep CLI.

az bicep list-versions

List out all available versions of Bicep CLI.

az bicep publish

Publish a bicep file to a remote module registry.

az bicep uninstall

Uninstall Bicep CLI.

az bicep upgrade

Upgrade Bicep CLI to the latest version.

az bicep version

Show the installed version of Bicep CLI.

az bicep build

Build a Bicep file.

az bicep build --file
               [--outdir]
               [--outfile]
               [--stdout]
               [--subscription]

Examples

Build a Bicep file.

az bicep build --file {bicep_file}

Build a Bicep file and print all output to stdout.

az bicep build --file {bicep_file} --stdout

Build a Bicep file and save the result to the specified directory.

az bicep build --file {bicep_file} --outdir {out_dir}

Build a Bicep file and save the result to the specified file.

az bicep build --file {bicep_file} --outfile {out_file}

Required Parameters

--file -f

The path to the Bicep file to build in the file system.

Optional Parameters

--outdir

When set, saves the output at the specified directory.

--outfile

When set, saves the output as the specified file path.

--stdout

When set, prints all output to stdout instead of corresponding files.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bicep decompile

Attempt to decompile an ARM template file to a Bicep file.

az bicep decompile --file
                   [--subscription]

Examples

Decompile an ARM template file.

az bicep decompile --file {json_template_file}

Required Parameters

--file -f

The path to the ARM template to decompile in the file system.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bicep install

Install Bicep CLI.

az bicep install [--subscription]
                 [--version]

Examples

Install Bicep CLI.

az bicep install

Install a specific version of Bicep CLI.

az bicep install --version v0.2.212

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--version -v

The version of Bicep CLI to be installed. Default to the latest if not specified.

az bicep list-versions

List out all available versions of Bicep CLI.

az bicep list-versions [--subscription]

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bicep publish

Publish a bicep file to a remote module registry.

az bicep publish --file
                 --target
                 [--subscription]

Examples

Publish a bicep file.

az bicep publish --file {bicep_file} --target "br:{registry}/{module_path}:{tag}"

Required Parameters

--file -f

The path to the Bicep module file to publish in the file system.

--target -t

The target location where the Bicep module will be published.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bicep uninstall

Uninstall Bicep CLI.

az bicep uninstall [--subscription]

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bicep upgrade

Upgrade Bicep CLI to the latest version.

az bicep upgrade [--subscription]

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bicep version

Show the installed version of Bicep CLI.

az bicep version [--subscription]

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.