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 generate-params

Generate parameters file for 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 restore

Restore external modules for a bicep file.

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
               [--no-restore]
               [--outdir]
               [--outfile]
               [--stdout]

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}

Build a Bicep file without restoring external modules.

az bicep build --file {bicep_file} --no-restore

Required Parameters

--file -f

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

Optional Parameters

--no-restore

When set, builds the bicep file without restoring external modules.

--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.

az bicep decompile

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

az bicep decompile --file
                   [--force]

Examples

Decompile an ARM template file.

az bicep decompile --file {json_template_file}

Decompile an ARM template file and overwrite existing Bicep file.

az bicep decompile --file {json_template_file} --force

Required Parameters

--file -f

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

Optional Parameters

--force

Allows overwriting the output file if it exists.

az bicep generate-params

Generate parameters file for a Bicep file.

az bicep generate-params --file
                         [--no-restore]
                         [--outdir]
                         [--outfile]
                         [--stdout]

Examples

Generate parameters file for a Bicep file.

az bicep generate-params --file {bicep_file}

Generate parameters file for a Bicep file and print all output to stdout.

az bicep generate-params --file {bicep_file} --stdout

Generate parameters file for a Bicep file and save the result to the specified directory.

az bicep generate-params --file {bicep_file} --outdir {out_dir}

Generate parameters file for a Bicep file and save the result to the specified file.

az bicep generate-params --file {bicep_file} --outfile {out_file}

Generate parameters file for a Bicep file without restoring external modules.

az bicep generate-params --file {bicep_file} --no-restore

Required Parameters

--file -f

The path to the Bicep file to generate the parameters file from in the file system.

Optional Parameters

--no-restore

When set, generates the parameters file without restoring external modules.

--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.

az bicep install

Install Bicep CLI.

az bicep install [--target-platform {linux-musl-x64, linux-x64, osx-x64, win-x64}]
                 [--version]

Examples

Install Bicep CLI.

az bicep install

Install a specific version of Bicep CLI.

az bicep install --version v0.2.212

Install Bicep CLI and specify the target platform.

az bicep install --target-platform linux-x64

Optional Parameters

--target-platform -t

The platform the Bicep CLI will be running on. Set this to skip automatic platform detection if it does not work properly.

accepted values: linux-musl-x64, linux-x64, osx-x64, win-x64
--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

az bicep publish

Publish a bicep file to a remote module registry.

az bicep publish --file
                 --target

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.

az bicep restore

Restore external modules for a bicep file.

az bicep restore --file
                 [--force]

Examples

Retore external modules.

az bicep restore --file {bicep_file}

Retore external modules and overwrite cached external modules.

az bicep restore --file {bicep_file} --force

Required Parameters

--file -f

The path to the Bicep file to restore external modules for.

Optional Parameters

--force

Allows overwriting the cached external modules.

az bicep uninstall

Uninstall Bicep CLI.

az bicep uninstall

az bicep upgrade

Upgrade Bicep CLI to the latest version.

az bicep upgrade [--target-platform {linux-musl-x64, linux-x64, osx-x64, win-x64}]

Examples

Upgrade Bicep CLI.

az bicep upgrade

Upgrade Bicep CLI and specify the target platform.

az bicep upgrade --target-platform linux-x64

Optional Parameters

--target-platform -t

The platform the Bicep CLI will be running on. Set this to skip automatic platform detection if it does not work properly.

accepted values: linux-musl-x64, linux-x64, osx-x64, win-x64

az bicep version

Show the installed version of Bicep CLI.

az bicep version