Skip to content

Step 1b - Configuring the Virtual Machine Scale Set using Terraform

Rename of organization

Due to the renaming of Company, the Github organization has changed name from "amestofortytwo" to "fortytwoservices". Pre-existing Terraform code would need to change that in code.

Prereqs

Deployment

We have published this Terraform module for simplified deployment. If you are not familiar with using Terraform, consider using the manual method instead, but it should be fairly easy for most people.

Start by creating an empty folder with a single file main.tf, with the below content, and running the terraform.ps1 code line by line:

provider "azurerm" {
  features {}
}

module "vmss" {
  source                         = "fortytwoservices/selfhostedrunnervmss/azurerm"
  operating_system               = "ubuntu"       # windows or ubuntu
  runner_platform                = "azure_devops" # azure_devops or github
}
az login
az account set --subscription "<your subscription id>"
az vm image terms accept --offer self_hosted_runner_ado --plan ubuntu-latest --publisher amestofortytwoas1653635920536
az vm image terms accept --offer self_hosted_runner_ado --plan windows-latest --publisher amestofortytwoas1653635920536
terraform init
terraform apply

Continue to step 2 - Configuring the Azure DevOps Agent Pool