Bicep CLI is a command-line tool designed to simplify the deployment and management of Azure resources using Bicep, a Domain Specific Language (DSL). It enables users to define infrastructure as code in a clean, intuitive syntax that promotes modularity and reusability.
Key Features:
Clean and intuitive syntax for defining Azure resources.
Built-in support for modular templates and reusable components.
Enhanced type system for improved validation and error detection.
Seamless integration with the Azure CLI for extended functionality.
Audience & Benefit:
Ideal for cloud engineers, developers, and IT professionals working with Azure, Bicep CLI streamlines infrastructure management by reducing complexity and improving productivity. Users benefit from faster authoring, easier collaboration, reduced errors, and more efficient CI/CD pipelines. It can be installed via winget for quick setup.
README
Azure Bicep
For all you need to know about the Bicep language, check out our Bicep documentation.
What is Bicep?
Bicep is a infrastructure-as-code (IaC) programming language that uses declarative syntax to deploy Azure resources. In a Bicep file, you define the infrastructure you want to deploy to Azure and then use that file throughout the development lifecycle to repeatedly deploy that infrastructure. Your resources are deployed in a consistent manner.
Also, there is a rich library of Bicep modules in Azure Verified Modules, and examples in the repo to help you get started. You can also use the to try out Bicep in your browser.
If you're looking for production-ready and tested Bicep templates, you can find them in the bicep-registry-modules repo. Learn more about these templates on the Azure Verified Modules website: https://aka.ms/avm.
How does Bicep work?
First, author your Bicep code using the Bicep language service as part of the Bicep VS Code extension
Both Az CLI (2.20.0+) and the PowerShell Az module (v5.6.0+) have Bicep support built-in. This means you can use the standard deployment commands with your *.bicep files and the tooling will transpile the code and send it to ARM on your behalf. For example, to deploy main.bicep to a resource group my-rg, we can use the CLI command we are already used to:
az deployment group create -f ./main.bicep -g my-rg
Goals
Build the best possible language for describing, validating, and deploying infrastructure to Azure.
The language should provide a transparent abstraction for the underlying platform. There must be no "onboarding step" to enable Bicep support for a new resource type and/or api version.
Code should be easy to understand at a glance and straightforward to learn, regardless of your experience with other programming languages.
Users should be given a lot of freedom to modularize and re-use their code. Code re-use should not require any 'copy/paste'-ing.
Tooling should provide a high level of resource discoverability and validation, and should be developed alongside the compiler rather than added at the end.
Users should have a high level of confidence that their code is 'syntactically valid' before deploying.
Non-goals
Build a general purpose language to meet any need. This will not replace general purpose languages and you may still need to do pre or post-Bicep execution tasks in a script or high-level programming language.
Provide a first-class provider model for non-Azure related tasks. While we have introducted an extensibility model with current support for Microsoft Graph, official extension points are intended to be focused on Azure infra or application deployment related tasks.
FAQ
What unique benefits do you get with Bicep?
Day 0 resource provider support. Any Azure resource — whether in private or public preview or GA — can be provisioned using Bicep.
No state or state files to manage. All state is stored in Azure, so makes it easy to collaborate and make changes to resources confidently.
Tooling is the cornerstone to any great experience with a programming language. Our VS Code extension for Bicep makes it extremely easy to author and get started with advanced type validation based on all Azure resource type API definitions.
We are here to help you be successful with Bicep, please do not hesitate to reach out to us.
If you need help or have a generic question such as ‘where can I find an example for…’ or ‘I need help converting my ARM Template to Bicep’ you can open a discussion
If you have a bug to report or a new feature request for Bicep please open an issue
Because we are now treating the ARM Template as an IL, we expect and encourage other implementations of IL (ARM Template) generation. We'll keep a running list of alternatives for creating ARM templates that may better fit your use case.
Farmer (@isaacabraham) - Generate and deploy ARM Templates on .NET
Cloud Maker (@cloud-maker-ai) - Draw deployable infrastructure diagrams that are converted to ARM templates or Bicep
Telemetry
When using the Bicep VS Code extension, VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.
See Contributing to Bicep for information on building/running the code, contributing code, contributing examples and contributing feature requests or bug reports.