This repository provides a fully functional Terraform script for creating an Azure Managed DevOps Pool. By leveraging Microsoft-hosted runner images (or your own custom images), you can streamline your CI/CD pipelines without maintaining Azure Virtual Machine Scale Sets. For more details and context, check out the article on AzureWay.cloud.
- Adequate Resource Quotas in your Azure subscription. The default setting is to create 4 agents, so you need at least 8 vCPUs
- Azure Subscription access to register providers
- Administrator Role on the desired Agent Pools in Azure DevOps in the Organization and Project level
-
Clone this repository.
-
Configure your environment by creating a
main.auto.tfvars
file with values for these variables:spn-client-id = "PRINCIPAL_CLIENT_ID" spn-tenant-id = "TENANT_ID" azure_devops_organization_name = "ADO_ORGANIZATION" subscription-id = "SUBSCRIPTION_ID" ado_project_id = "ADO_PROJECT_ID" pipeline_ids = ["PIPELINE_ID"]
-
Initialize Terraform:
terraform init
-
Review your plan:
terraform plan
-
Apply the changes:
terraform apply -var="spn-client-secret=$SPN_CLIENT_SECRET}}"