• Stars
    star
    3,240
  • Rank 13,851 (Top 0.3 %)
  • Language Bicep
  • License
    MIT License
  • Created over 4 years ago
  • Updated 22 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bicep is a declarative language for describing and deploying Azure resources

Build codecov Good First Issues Needs Feedback

Azure Bicep

For all you need to know about the Bicep language, check out our Bicep documentation.

What is Bicep?

Bicep is a Domain Specific Language (DSL) for deploying Azure resources declaratively. It aims to drastically simplify the authoring experience with a cleaner syntax, improved type safety, and better support for modularity and code re-use. Bicep is a transparent abstraction over ARM and ARM templates, which means anything that can be done in an ARM Template can be done in Bicep (outside of temporary known limitations). All resource types, apiVersions, and properties that are valid in an ARM template are equally valid in Bicep on day one (Note: even if Bicep warns that type information is not available for a resource, it can still be deployed).

Bicep code is transpiled to standard ARM Template JSON files, which effectively treats the ARM Template as an Intermediate Language (IL).

Video overview of Bicep

Goals

  1. Build the best possible language for describing, validating, and deploying infrastructure to Azure.
  2. 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.
  3. Code should be easy to understand at a glance and straightforward to learn, regardless of your experience with other programming languages.
  4. 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.
  5. Tooling should provide a high level of resource discoverability and validation, and should be developed alongside the compiler rather than added at the end.
  6. Users should have a high level of confidence that their code is 'syntactically valid' before deploying.

Non-goals

  1. 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.
  2. Provide a first-class provider model for non-Azure related tasks. While we will likely introduce an extensibility model at some point, any extension points are intended to be focused on Azure infra or application deployment related tasks.

Get started with Bicep

To get going with Bicep:

  1. Start by installing the tooling.
  2. Complete the Bicep Learning Path

Alternatively, you can use the VS Code Devcontainer/Codespaces repo to get a preconfigured environment.

If you have an existing ARM Template or set of resources that you would like to convert to .bicep format, see Decompiling an ARM Template.

Also, there is a rich library of examples in the azure-quickstart-templates repo to help you get started.

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

For more detail on taking advantage of new Bicep constructs that replace an equivalent from ARM Templates, you can read the moving from ARM => Bicep doc.

Known limitations

  • Bicep is newline sensitive. We are exploring ways we can remove/relax this restriction (#146)
  • No support for the concept of apiProfile which is used to map a single apiProfile to a set apiVersion for each resource type. We are looking to bring support for this type of capability, but suspect it will work slightly differently. Discussion is in #622

FAQ

What unique benefits do you get with Bicep?

  1. Day 0 resource provider support. Any Azure resource β€” whether in private or public preview or GA β€” can be provisioned using Bicep.
  2. Much simpler syntax compared to equivalent ARM Template JSON
  3. 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.
  4. 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.
  5. Easily break apart your code with native modules
  6. Supported by Microsoft support and 100% free to use.

Why create a new language instead of using an existing one?

Bicep is more of a revision to the existing ARM template language rather than an entirely new language. While most of the syntax has been changed, the core functionality of ARM templates and the runtime remains the same. You have the same template functions, same resource declarations, etc. Part of the complexity with ARM Templates is due to the "DSL" being embedded inside of JSON. With Bicep, we are revising the syntax of this DSL and moving it into its own .bicep file format. Before going down this path, we closely evaluated using an existing high-level programming language, but ultimately determined that Bicep would be easier to learn for our target audience. We are open to other implementations of Bicep in other languages.

We spent a lot of time researching various different options and even prototyped a TypeScript based approach. We did over 120 customer calls, Microsoft Most Valuable Professional (MVP) conversations and collected quantitative data. We learned that in majority of organizations, it was the cloud enablement teams that were responsible for provisioning the Azure infra. These folks were not familiar with programming languages and did not like that approach as it had a steep learning curve. These users were our target users. In addition, authoring ARM template code in a higher level programming language would require you to reconcile two uneven runtimes, which ends up being confusing to manage. At the end of the day, we simply want customers to be successful on Azure. In the future if we hear more feedback asking us to support a programming language approach, we are open to that as well. If you'd like to use a high-level programming language to deploy Azure Infra we recommend Farmer or Pulumi.

Why not focus your energy on Terraform or other third-party IaC offerings?

Using terraform can be a great choice depending on the requirements of the organization, and if you are happy using terraform there is no reason to switch. At Microsoft, we are actively investing to make sure the terraform on Azure experience is the best it can be.

That being said, there is a huge customer base using ARM templates today because it provides a unique set of capabilities and benefits. We wanted to make the experience for those customers first-class as well, in addition to making it easier to start for Azure focused customers who have not yet transitioned to infra-as-code.

Fundamentally, we believe that configuration languages and tools are always going to be polyglot and different users will prefer different tools for different situations. We want to make sure all of these tools are great on Azure, Bicep is only a part of that effort.

Is this ready for production use?

Yes. As of v0.3, Bicep is now supported by Microsoft Support Plans and Bicep has 100% parity with what can be accomplished with ARM Templates. As of this writing, there are no breaking changes currently planned, but it is still possible they will need to be made in the future.

Is this only for Azure?

Bicep is a DSL focused on deploying end-to-end solutions in Azure. In practice, that usually means working with some non-Azure APIs (i.e. creating Kubernetes deployments or users in a database), so we expect to provide some extensibility points. That being said, currently only Azure resources exposed through the ARM API can be created with Bicep.

What happens to my existing ARM Template investments?

One of our goals is to make the transition from ARM Templates to Bicep as easy as possible. The Bicep CLI supports a decompile command to generate Bicep code from an ARM template. Please see Decompiling an ARM Template for usage information.

Note that while we want to make it easy to transition to Bicep, we will continue to support and enhance the underlying ARM Template JSON language. As mentioned in What is Bicep?, ARM Template JSON remains the wire format that will be sent to Azure to carry out a deployment.

Get Help, Report an issue

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

Reference

Community Bicep projects

Alternatives

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.

License

All files except for the Azure Architecture SVG Icons in the repository are subject to the MIT license.

The Azure Architecture SVG Icons used in the Bicep VS Code extension are subject to the Terms of Use.

Contributing

See Contributing to Bicep for information on building/running the code, contributing code, contributing examples and contributing feature requests or bug reports.

More Repositories

1

azure-quickstart-templates

Azure Quickstart Templates
Bicep
13,949
star
2

azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
C#
5,256
star
3

autorest

OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python
TypeScript
4,594
star
4

Azure-Sentinel

Cloud-native SIEM for intelligent security analytics for your entire enterprise.
Jupyter Notebook
4,559
star
5

azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
Python
4,540
star
6

azure-powershell

Microsoft Azure PowerShell
C#
4,178
star
7

MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
Jupyter Notebook
4,090
star
8

DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
C#
4,087
star
9

azure-cli

Azure Command-Line Interface
Python
3,930
star
10

draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
Go
3,925
star
11

azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
HCL
2,634
star
12

azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
Java
2,305
star
13

azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
TypeScript
2,051
star
14

AKS

Azure Kubernetes Service
HTML
1,965
star
15

azure-functions-host

The host/runtime that powers Azure Functions
C#
1,871
star
16

golua

A Lua 5.3 engine implemented in Go
Go
1,850
star
17

Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
TypeScript
1,823
star
18

azureml-examples

Official community-driven Azure Machine Learning examples, tested with GitHub Actions.
Jupyter Notebook
1,733
star
19

Microsoft-Defender-for-Cloud

Welcome to the Microsoft Defender for Cloud community repository
PowerShell
1,677
star
20

Enterprise-Scale

The Azure Landing Zones (Enterprise-Scale) architecture provides prescriptive guidance coupled with Azure best practices, and it follows design principles across the critical design areas for organizations to define their Azure architecture
PowerShell
1,603
star
21

azure-sdk-for-go

This repository is for active development of the Azure SDK for Go. For consumers of the SDK we recommend visiting our public developer docs at:
Go
1,594
star
22

Stormspotter

Azure Red Team tool for graphing Azure and Azure Active Directory objects
Python
1,525
star
23

durabletask

Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
C#
1,516
star
24

azure-policy

Repository for Azure Resource Policy built-in definitions and samples
Open Policy Agent
1,485
star
25

iotedge

The IoT Edge OSS project
C#
1,421
star
26

aztfexport

A tool to bring existing Azure resources under Terraform's management
Go
1,335
star
27

review-checklists

This repo contains code and examples to operationalize Azure review checklists.
Python
1,187
star
28

azure-sdk-for-node

Azure SDK for Node.js - Documentation
JavaScript
1,187
star
29

azure-functions-core-tools

Command line tools for Azure Functions
C#
1,128
star
30

Azure-Functions

PowerShell
1,108
star
31

acs-engine

WE HAVE MOVED: Please join us at Azure/aks-engine!
Go
1,031
star
32

aks-engine

AKS Engine: legacy tool for Kubernetes on Azure (see status)
Go
1,027
star
33

data-api-builder

Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.
C#
912
star
34

terraform-azurerm-caf-enterprise-scale

Azure landing zones Terraform module
HCL
856
star
35

coco-framework

The Confidential Consortium Blockchain Framework is an open-source system that enables high-scale, confidential blockchain networks that meet all key enterprise requirementsβ€”providing a means to accelerate production enterprise adoption of blockchain technology.
834
star
36

azure-iot-sdks

SDKs for a variety of languages and platforms that help connect devices to Microsoft Azure IoT services
829
star
37

GPT-RAG

Sharing the learning along the way we been gathering to enable Azure OpenAI at enterprise scale in a secure manner. GPT-RAG core is a Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
Bicep
822
star
38

AzurePublicDataset

Microsoft Azure Traces
Jupyter Notebook
790
star
39

azure-sql-database-samples

Azure SQL Database Samples and Reference Implementation Repository
Python
781
star
40

Azure-Network-Security

Resources for improving Customer Experience with Azure Network Security
Python
768
star
41

caf-terraform-landingzones

This solution, offered by the Open-Source community, will no longer receive contributions from Microsoft. Customers are encouraged to transition to Microsoft Azure Verified Modules for continued support and updates from Microsoft. Please note, this repository is scheduled for decommissioning and will be removed on July 1, 2025.
HCL
763
star
42

azure-search-vector-samples

A repository of code samples for Vector search capabilities in Azure AI Search.
Jupyter Notebook
750
star
43

azure-service-operator

Azure Service Operator allows you to create Azure resources using kubectl
Go
741
star
44

azure-functions-durable-extension

Durable Task Framework extension for Azure Functions
C#
714
star
45

azure-webjobs-sdk

Azure WebJobs SDK
C#
712
star
46

ResourceModules

This repository includes a CI platform for and collection of mature and curated Bicep modules. The platform supports both ARM and Bicep and can be leveraged using GitHub actions as well as Azure DevOps pipelines.
Bicep
710
star
47

ALZ-Bicep

This repository contains the Azure Landing Zones (ALZ) Bicep modules that help deliver and deploy the Azure Landing Zone conceptual architecture in a modular approach. https://aka.ms/alz/docs
Bicep
694
star
48

azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
Rust
692
star
49

terraform

Source code for the Azure Marketplace Terraform development VM package.
HCL
690
star
50

azure-api-management-devops-resource-kit

Azure API Management DevOps Resource Kit
C#
684
star
51

application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
Go
668
star
52

CCOInsights

Welcome to the Continuous Cloud Optimization Power BI Dashboard GitHub Project. In this repository you will find all the guidance and files needed to deploy the Dashboard in your environment to take benefit of a single pane of glass to get insights about your Azure resources and services.
Mathematica
668
star
53

SimuLand

Understand adversary tradecraft and improve detection strategies
PowerShell
664
star
54

DeepLearningForTimeSeriesForecasting

A tutorial demonstrating how to implement deep learning models for time series forecasting
Jupyter Notebook
655
star
55

azure-xplat-cli

For ARM-based service please go to CLI 2.0.
JavaScript
651
star
56

azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
C#
637
star
57

node-sqlserver

C++
625
star
58

azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
Python
621
star
59

azure-storage-fuse

A virtual file system adapter for Azure Blob storage
Go
613
star
60

Community-Policy

This repo is for Microsoft Azure customers and Microsoft teams to collaborate in making custom policies.
Open Policy Agent
612
star
61

azure-resource-manager-schemas

Schemas used to author and validate Resource Manager Templates. These schemas power the intellisense and syntax completion in our ARM Tools VSCode extension, as well as the Export Template API
TypeScript
610
star
62

azure-storage-azcopy

The new Azure Storage data transfer utility - AzCopy v10
Go
607
star
63

counterfit

a CLI that provides a generic automation layer for assessing the security of ML models
Python
599
star
64

azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
C
587
star
65

azure-cosmos-dotnet-v2

Contains samples and utilities relating to the Azure Cosmos DB .NET SDK
577
star
66

azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
571
star
67

aad-pod-identity

[DEPRECATED] Assign Azure Active Directory Identities to Kubernetes applications.
Go
569
star
68

Azure-Sentinel-Notebooks

Interactive Azure Sentinel Notebooks provides security insights and actions to investigate anomalies and hunt for malicious behaviors.
Jupyter Notebook
541
star
69

draft

A day 0 tool for getting your app on k8s fast
Go
541
star
70

AzureStack-QuickStart-Templates

Quick start ARM templates that deploy on Microsoft Azure Stack
PowerShell
540
star
71

azure-openai-samples

Azure OpenAI Samples is a collection of code samples illustrating how to use Azure Open AI in creating AI solution for various use cases across industries. This repository is mained by a community of volunters. We welcomed your contributions.
Jupyter Notebook
540
star
72

WALinuxAgent

Microsoft Azure Linux Guest Agent
Python
538
star
73

AI-in-a-Box

AI-in-a-Box leverages the expertise of Microsoft across the globe to develop and provide AI and ML solutions to the technical community. Our intent is to present a curated collection of solution accelerators that can help engineers establish their AI/ML environments and solutions rapidly and with minimal friction.
Jupyter Notebook
529
star
74

iot-edge-v1

Azure IoT Edge
C
524
star
75

Industrial-IoT

Azure Industrial IoT Platform
C#
521
star
76

MS-AMP

Microsoft Automatic Mixed Precision Library
Python
516
star
77

Mission-Critical

This repository provides a design methodology and approach to building highly-reliable applications on Microsoft Azure for mission-critical workloads.
510
star
78

static-web-apps-cli

Azure Static Web Apps CLI ✨
TypeScript
509
star
79

mlops-v2

Azure MLOps (v2) solution accelerators. Enterprise ready templates to deploy your machine learning models on the Azure Platform.
Shell
505
star
80

azure-docs-powershell-samples

Azure Powershell code samples, often used in docs.microsoft.com/Azure developer documentation
PowerShell
503
star
81

azqr

Azure Quick Review
Go
503
star
82

bicep-registry-modules

Bicep registry modules
Bicep
501
star
83

azure-storage-node

Microsoft Azure Storage SDK for Node.js
JavaScript
495
star
84

api-management-developer-portal

Developer portal provided by the Azure API Management service.
TypeScript
487
star
85

kubelogin

A Kubernetes credential (exec) plugin implementing azure authentication
Go
486
star
86

Azure-TDSP-ProjectTemplate

TDSP: Data science project template repository with standardized directory structure and document templates to support efficient project execution and collaboration.
R
483
star
87

azure-sdk

This is the Azure SDK parent repository and mostly contains documentation around guidelines and policies as well as the releases for the various languages supported by the Azure SDK.
PowerShell
478
star
88

azure-mobile-services

Mobile Services is deprecated - Use Mobile Apps instead
HTML
472
star
89

azure-devtestlab

Azure DevTestLab artifacts, scripts and samples
PowerShell
458
star
90

azure-iot-sdk-csharp

A C# SDK for connecting devices to Microsoft Azure IoT services
C#
455
star
91

actions-workflow-samples

Help developers to easily get started with GitHub Action workflows to deploy to Azure
Pug
450
star
92

azure-devops-utils

Azure DevOps Utilities
Shell
450
star
93

AzureDatabricksBestPractices

Version 1 of Technical Best Practices of Azure Databricks based on real world Customer and Technical SME inputs
446
star
94

app-service-announcements

Subscribe to this repo to be notified about major changes in App Service
446
star
95

azure-storage-net

Microsoft Azure Storage Libraries for .NET
C#
445
star
96

Azure-DataFactory

C#
444
star
97

arm-ttk

Azure Resource Manager Template Toolkit
PowerShell
442
star
98

RDS-Templates

ARM Templates for Remote Desktop Services deployments
PowerShell
427
star
99

Copilot-For-Security

Microsoft Copilot for Security is a generative AI-powered security solution that helps increase the efficiency and capabilities of defenders to improve security outcomes at machine speed and scale, while remaining compliant to responsible AI principles
PowerShell
426
star
100

enterprise-azure-policy-as-code

Enterprise-ready Azure Policy-as-Code (PaC) solution (includes Az DevOps pipeline)
PowerShell
423
star