Skip to content

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



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, with the below content, and running ther terraform.ps1 code line by line:

provider "azurerm" {
  features {}

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

Continue to step 2 - Configuring the virtual machine scale set for auto registration