Deploy and manage resources in Azure by using Bicep

Beginner
Developer
Administrator
Solution Architect
Azure
Azure Resource Manager

Bicep enables you to deploy Azure resources. Bicep uses a declarative syntax that you treat like application code. Treating your infrastructure as code enables you to track changes to your infrastructure requirements and makes your deployments more consistent and repeatable.

If you're familiar with the JSON syntax for writing Azure Resource Manager templates (ARM templates), you'll find that Bicep provides a more concise syntax and improved type safety. In fact, Bicep files compile to standard ARM templates.

Take this learning path to get started with Bicep. In it, you'll:

  • Decide whether Bicep is the right choice for your deployments to Azure.
  • Understand Bicep's declarative syntax and the structure of a Bicep template.
  • Apply Bicep features such as parameters, conditions, and loops to control how your infrastructure is deployed.
  • Define modules that break down complex deployments into smaller and more reusable components.
  • Deploy advanced Azure resource types, including child and extension resources.
  • Deploy resources at the subscription, management group, and tenant level.
  • Build deployment scripts that define custom steps in your Bicep templates.

Each module in this learning path provides options for use with the Azure CLI and with Azure PowerShell. You'll use Visual Studio Code to write and validate your Bicep code.

To learn about Bicep, we recommend you take these two learning paths:

The trophy for the Deploy and manage resources in Azure by using Bicep learning path.

Part 1: Deploy and manage resources in Azure by using Bicep

After that, you might be interested in adding your Bicep code to a deployment pipeline. Take one of these two learning paths based on the tool you want to use:

Prerequisites

Familiarity with Azure Resource Manager and Azure resource groups is recommended, but not required.

Modules in this learning path

Describe the benefits of using infrastructure as code, Azure Resource Manager, and Bicep to quickly and confidently scale your cloud deployments. Determine the types of deployments for which Bicep is a good declarative deployment tool.

Define Azure resources within a Bicep template. Improve the consistency and reliability of your deployments, reduce the manual effort required, and scale your deployments across environments. Your template will be flexible and reusable through the use of parameters, variables, expressions, and modules.

Use Bicep parameters to provide information for your template during each deployment. Add decorators to make your parameters easy to understand and work with, and to protect secret data. Provide parameter values at the command line and by using parameter files.

Deploy resources only when specific constraints are in place. Use loops to deploy multiple resources that have similar properties.

Design and build reusable modules to simplify your Bicep templates. Compose multiple modules into templates by using parameters and outputs.

Deploy a variety of Azure resources in your Bicep code. Define and use child and extension resources. Work with resources that you created outside a Bicep template or module.

Deploy Azure resources at the subscription, management group, and tenant scope. Understand how Azure resources are deployed at different scopes, why this is important, and how to create Bicep code to deploy them. Create a single set of Bicep files that you can deploy across multiple scopes in one operation.

Add custom steps to your Bicep or JSON Azure Resource Manager templates (ARM templates). Integrate deployment scripts with your deployment by using parameters and outputs.