AzureFunBytes Episode 50 - Intro to @BicepLang with @adotfrank
Tags: iac, cloud, azure, beginners
Published: 2021-07-08 18:05:51

AzureFunBytes is a weekly opportunity to learn more about the fundamentals and foundations that make up Azure. It's a chance for me to understand more about what people across the Azure organization do and how they do it. Every week we get together at 11 AM Pacific on [Microsoft LearnTV](https://cda.ms/226) and learn more about Azure.

![AzureFunBytes animation](https://res.cloudinary.com/practicaldev/image/fetch/s--Z7BxBMz1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2xzw2g664tj31jij13t.gif)

This week on AzureFunBytes we flex some Azure muscle with [Bicep](https://cda.ms/2dv).  Bicep is a language that allows you to use a declarative syntax to codify your Azure infrastructure deployments.  Bicep is an Azure native [Domain-Specific Language (DSL)](https://cda.ms/2dm) that promotes a cleaner syntax, improved type safety, and better support for modularity and re-use of code.  Bicep is a transparent abstraction over [Azure Resource Manager (ARM) templates](https://cda.ms/2dt) that gives you the ability to create nearly any required resource within Azure.  [Bicep has a playground](https://bicepdemo.z22.web.core.windows.net/) that allows you to start using existing ARM Template Quickstarts right away.  Or if you choose to build them from scratch, the snippets with the [VS Code Bicep extension](https://cda.ms/2df) will be a huge help. 

![Bicep to JSON](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/987m8ma7xxtofjt533aj.png)

I was lucky enough to get one of the experts on Bicep to join us this week!  We'll welcome [Microsoft Program Manager Alex Frankel](https://twitter.com/adotfrank) to the show to give us greater insight into how to use Bicep to create our infrastructure.  I'll ask Alex your questions, we'll look at some Bicep basics, discuss best practices, and even kick off some deployments.  Don't miss this incredible opportunity to learn about building your [Infrastructure as Code (IAC)](https://cda.ms/2dg) with Bicep!

{% youtube h6w6bEx4eCM %}

Our Agenda:

- Why we are investing in Bicep in the first place
  - ARM Templates are by far the most popular declarative tool for deploying to Azure, want to improve experience for those customers
  - Clarify that Bicep is just one of many great options
- Key differences between Bicep and ARM templates
  - Modules, richer intellisense, auto DependsOn, richer type safety
- How the language is designed and the importance of tooling
  - In terms of language design (not complexity), Bicep shares more DNA with C# and TypeScript than traditional “scripting” languages like HCL or Chef
  - Tooling is built alongside the language, so our syntax decisions are always driven by our ability to build tooling to go with it
- Benefits of being “Azure native”
  - Day zero support for all resource types
  - No state management without losing the ability to perform what-if (“tf plan” equivalent) and manage lifecycle (“tf destroy” equivalent)
  - Works with other platform capabilities like Template Specs, Azure Marketplace, etc.

Full details of how the Bicep language works can be found in the [Bicep documentation](https://cda.ms/2dx) and there is a rich library of examples to help you get a jumpstart.

Alternatively, you can try the [Bicep Playground](https://aka.ms/bicepdemo) or use the [VS Code Devcontainer/Codespaces](https://github.com/Azure/vscode-remote-try-bicep) 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](https://github.com/Azure/bicep/blob/main/docs/decompiling.md).

Full details of how the bicep language works can be found in the [Bicep documentation](https://github.com/Azure/bicep/tree/main/docs) and there is a rich library of [examples](https://github.com/Azure/bicep/tree/main/docs/examples) to help you get a jumpstart.

------

Learn about Azure fundamentals with me!

Live stream is normally found on Twitch, YouTube, and LearnTV at 11 AM PT / 2 PM ET Thursday. You can also find the recordings here as well:

[AzureFunBytes on Twitch](https://twitch.tv/azurefunbytes)
[AzureFunBytes on YouTube](https://aka.ms/jaygordononyoutube)
[Azure DevOps YouTube Channel](https://www.youtube.com/channel/UC-ikyViYMM69joIAv7dlMsA)
[Follow AzureFunBytes on Twitter](https://twitter.com/azurefunbytes)

Useful Docs:

[Get $200 in free Azure Credit](https://cda.ms/219)
[Microsoft Learn: Introduction to Azure fundamentals](https://cda.ms/243)
[Microsoft Learn: Deploy and manage resources in Azure by using Bicep](https://cda.ms/2dc)
[Bicep Documentation](https://cda.ms/2db) 
[Quickstart: Create Bicep files with Visual Studio Code](https://cda.ms/2df)
[Bicep Playground](https://bicepdemo.z22.web.core.windows.net/)
[ARM template documentation](https://cda.ms/2dt)
[Bicep on Twitter](https://twitter.com/BicepLang)
[Install the Azure CLI](https://cda.ms/2d9)
[Best practices for Bicep](https://cda.ms/2dd)
[What is Infrastructure as Code?](https://cda.ms/2dg)
[About Domain-Specific Languages](https://cda.ms/2dm)

{% youtube sc1kJfcRQgY %}