Member-only story
Step-by-Step Guide to Syncing Automation Runbooks with Managed Identity in Azure DevOps
Ever wondered how you could sync your Azure Automation Runbooks automatically? The straightforward method that arose involved utilizing a “Personal Access Token (PAT)” from Azure DevOps and using the New-AzAutomationSourceControl cmdlet. While this approach is effective, it requires manually providing your PAT each time. Consider an alternative, leverage a Managed Identity in Azure.
In this hands-on tutorial, you will build up an Azure Automation Account using Azure Bicep and sync your precious Runbooks using a Managed Identity.
Pre-requisites
Before you begin with the hands-on tutorial, there are some pre-requisites that you need to have in place:
- An Azure DevOps Services account
- An Azure subscription
- A code editor like Visual Studio (VSCode), or other editors you prefer
- PowerShell 5+ with the Az PowerShell module installed
- Bicep CLI, in this tutorial version 0.23.1 is used
Setting up infrastructure with Bicep
Before initiating the synchronization of your Runbooks, it’s essential to have a foundation and resources to work with. Therefore, you can set up your Azure Automation Account leveraging Bicep.
To create an Azure Automation Account, proceed with the following steps: