Deploy Azure resources by using Bicep and Azure Pipelines

Intermediate
Developer
Administrator
Solution Architect
Azure
Azure Resource Manager

Gain all of the benefits of infrastructure as code by using an automated pipeline to deploy your Bicep templates, and integrate other deployment activities with your pipelines. You'll build pipelines using Azure Pipelines.

Take this learning path to learn how to:

  • Build a pipeline that deploys your Bicep files.
  • Create a service principal that can securely connect your pipeline to Azure.
  • Ensure your Bicep code quality by validating and testing it within your pipeline.
  • Work with multiple environments, and handle parameters and approvals.
  • Deploy other Azure configuration settings, applications, and databases.
  • Build pipelines that publish reusable Bicep files to template specs and modules.
  • Secure your pipelines, and ensure all of your Azure deployments follow your organization's standards.

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

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

This learning path assumes you have familiarity with deploying infrastructure using Bicep.

Modules in this learning path

Create an automated pipeline in Azure Pipelines that securely deploys resources to Azure from Bicep code. Configure your pipeline to run on a schedule or when your configuration changes.

Service principals enable your deployment pipelines to authenticate securely with Azure. In this module, you'll learn what service principals are, how they work, and how to create them. You'll also learn how to grant them permission to your Azure resources so that your pipelines can deploy your Bicep files.

Validate and test your Bicep code in your deployment pipeline. You'll use linting, preflight validation, and the what-if operation to validate your Azure changes before you deploy, and you'll test your resources after each deployment.

Deploy your Bicep code to multiple environments to improve the quality of your deployments. Use pipeline templates to reduce code duplication, and set parameter values for each environment.

Create a unified pipeline to deploy your entire environment. You add a build stage to your pipeline, and use pipeline artifacts and Bicep outputs to publish applications, databases, and blobs.

Publish Azure template specs and Bicep modules by using a deployment pipeline. Automatically validate and add versioning to your reusable Bicep code.

Plan how to harden and help secure your Azure environment, along with the controls to apply to your configuration changes and deployments. Require your infrastructure be defined as code, and protect your environment against manual changes.