Linux command
az-bicep 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Build a Bicep file
az bicep build --file [main.bicep]
Decompile an ARM template
az bicep decompile --file [template.json]
Format a Bicep file
az bicep format --file [main.bicep]
Lint a Bicep file
az bicep lint --file [main.bicep]
Generate a parameters file
az bicep generate-params --file [main.bicep]
Install the Bicep CLI
az bicep install
Upgrade Bicep
az bicep upgrade
Publish a module
az bicep publish --file [main.bicep] --target "br:[registry.azurecr.io/bicep/modules/name:v1]"
说明
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. Requires Azure CLI version 2.20.0 or later; the Bicep CLI is automatically installed on first use if not present.
参数
- --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.
FAQ
What is the az-bicep command used for?
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. Requires Azure CLI version 2.20.0 or later; the Bicep CLI is automatically installed on first use if not present.
How do I run a basic az-bicep example?
Run `az bicep build --file [main.bicep]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --file _value_ do in az-bicep?
Path to the Bicep file.