Build your first Bicep file

Beginner
DevOps Engineer
Developer
Administrator
Azure Resource Manager

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

Learning objectives

After completing this module, you'll be able to:

  • Create and deploy Azure resources by using Bicep.
  • Add flexibility to your Bicep files by using parameters, variables, and expressions.
  • Create and deploy a Bicep file that includes modules.

Prerequisites

You should be familiar with:

  • Infrastructure as code and its benefits
  • Azure, including the Azure portal, subscriptions, resource groups, and resources

To follow along with the exercises in the module, you need the following software installed locally:

  • Visual Studio Code

  • The Bicep extension for Visual Studio Code

  • Either the latest Azure CLI tools or the latest version of Azure PowerShell

    Tip

    You can use either the Azure CLI or Azure PowerShell to complete this module. If you're not sure which to choose, we recommend you use the Azure CLI.

    Note

    Azure CLI automatically installs the Bicep CLI. Azure PowerShell requires a manual installation. For installation links, see the More info section of the Summary unit.

Important

To complete the optional exercises in this module, you need to use your own subscription, which might incur charges. If you want to follow along, you can use a trial subscription or a subscription that you already have access to. You'll find the trial subscription link in the More info section of the Summary unit.