LinuxCommandLibrary

az-bicep

Manage Bicep files for Azure infrastructure as code

TLDR

Build a Bicep file to ARM template

$ az bicep build --file [main.bicep]
copy
Decompile an ARM template to Bicep
$ az bicep decompile --file [template.json]
copy
Format a Bicep file
$ az bicep format --file [main.bicep]
copy
Lint a Bicep file for errors
$ az bicep lint --file [main.bicep]
copy
Generate a parameters file from Bicep
$ az bicep generate-params --file [main.bicep]
copy
Install the Bicep CLI
$ az bicep install
copy
Upgrade Bicep to the latest version
$ az bicep upgrade
copy
Publish a module to a registry
$ az bicep publish --file [main.bicep] --target "br:[registry.azurecr.io/bicep/modules/name:v1]"
copy

SYNOPSIS

az bicep subcommand [options]

DESCRIPTION

az bicep manages the Bicep CLI for Infrastructure as Code on Azure. Bicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources, serving as a transparent abstraction over ARM templates.
The command group provides tools for building, validating, formatting, and publishing Bicep files, as well as converting existing ARM templates to Bicep format.

PARAMETERS

--file value

Path to the Bicep file
--outdir value
Output directory for built files
--outfile value
Output file path for the built result
--stdout
Output to stdout instead of file
--target value
Module registry target for publishing
--version value
Specific Bicep CLI version to install

SUBCOMMANDS

Build & Compile

build, build-params, decompile, decompile-params
Validation
lint, format
Parameters
generate-params
Module Management
publish, restore
CLI Management
install, uninstall, upgrade, version, list-versions

CAVEATS

Decompilation from ARM templates produces functionally equivalent Bicep but may require manual refinement for readability. Bicep CLI is automatically installed on first use if not present. Module publishing requires a container registry with appropriate permissions.

HISTORY

Bicep was announced in August 2020 as a new language for Azure deployments, reaching version 1.0 in May 2021. It was designed to simplify the ARM template authoring experience while maintaining full compatibility with the Azure Resource Manager.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community