From 180e2e6911d7f29207136d572e84ff48c5f41c5f Mon Sep 17 00:00:00 2001 From: Jonathan Moss Date: Mon, 21 Sep 2026 10:06:40 -0400 Subject: [PATCH 1/2] Add an alpha ARM template spec with SSD base disk support --- terraform/azure_fxci/template_specs.tf | 24 ++ .../taskcluster-arm-template-alpha-1.0.json | 276 ++++++++++++++++++ 2 files changed, 300 insertions(+) create mode 100644 terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json diff --git a/terraform/azure_fxci/template_specs.tf b/terraform/azure_fxci/template_specs.tf index c30745b2..4d62ed08 100644 --- a/terraform/azure_fxci/template_specs.tf +++ b/terraform/azure_fxci/template_specs.tf @@ -142,3 +142,27 @@ resource "azapi_resource" "template_spec_version_taskcluster_arm_template_v6_nvm depends_on = [azapi_resource.template_spec_taskcluster_arm_template_v6_nvme] } + +resource "azapi_resource" "template_spec_taskcluster_arm_template_alpha" { + type = "Microsoft.Resources/templateSpecs@2022-02-01" + name = "taskcluster-arm-template-alpha" + parent_id = local.fxci_template_spec_resource_group_id + location = "eastus" + + body = { + properties = {} + } +} + +resource "azapi_resource" "template_spec_version_taskcluster_arm_template_alpha_1_0" { + type = "Microsoft.Resources/templateSpecs/versions@2022-02-01" + name = "1.0" + parent_id = azapi_resource.template_spec_taskcluster_arm_template_alpha.id + location = "eastus" + + body = { + properties = { + mainTemplate = jsondecode(file("${path.module}/template_specs/taskcluster-arm-template-alpha-1.0.json")) + } + } +} diff --git a/terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json b/terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json new file mode 100644 index 00000000..f3ea421b --- /dev/null +++ b/terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json @@ -0,0 +1,276 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "outputs": { + "resourceIds": { + "type": "object", + "value": { + "nic": "[variables('nicId')]", + "osDisk": "[resourceId('Microsoft.Compute/disks', variables('osDiskName'))]", + "privateIp": "[reference(resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))).ipConfigurations[0].properties.privateIPAddress]", + "publicIp": "[if(parameters('createPublicIp'), variables('publicIpId'), '')]", + "vm": "[resourceId('Microsoft.Compute/virtualMachines', parameters('vmName'))]" + } + } + }, + "parameters": { + "adminPassword": { + "metadata": { + "description": "Admin password (provided by worker-manager)" + }, + "type": "securestring" + }, + "adminUsername": { + "metadata": { + "description": "Admin username (provided by worker-manager)" + }, + "type": "string" + }, + "computerName": { + "metadata": { + "description": "Name of the computer name (osProfile, provided by worker-manager)" + }, + "type": "string" + }, + "createPublicIp": { + "defaultValue": false, + "metadata": { + "description": "Create a public IP for the VM" + }, + "type": "bool" + }, + "customData": { + "metadata": { + "description": "Custom data attached to osProfile (provided by worker-manager)" + }, + "type": "string" + }, + "diffDiskOption": { + "allowedValues": [ + "Local" + ], + "defaultValue": "Local", + "metadata": { + "description": "Ephemeral OS disk option" + }, + "type": "string" + }, + "diffDiskPlacement": { + "allowedValues": [ + "", + "CacheDisk", + "ResourceDisk", + "NvmeDisk" + ], + "defaultValue": "", + "metadata": { + "description": "Ephemeral OS disk placement. Leave this value empty to let Azure select the placement." + }, + "type": "string" + }, + "enableFullCaching": { + "defaultValue": false, + "metadata": { + "description": "Enable full caching for the ephemeral OS disk" + }, + "type": "bool" + }, + "evictionPolicy": { + "allowedValues": [ + "Deallocate", + "Delete" + ], + "defaultValue": "Delete", + "metadata": { + "description": "Eviction policy for Spot VMs" + }, + "type": "string" + }, + "imageId": { + "metadata": { + "description": "Full resource ID of the VM image" + }, + "type": "string" + }, + "location": { + "defaultValue": "eastus", + "metadata": { + "description": "Azure region for the VM" + }, + "type": "string" + }, + "osDiskCaching": { + "allowedValues": [ + "None", + "ReadOnly", + "ReadWrite" + ], + "defaultValue": "ReadOnly", + "metadata": { + "description": "OS disk caching mode" + }, + "type": "string" + }, + "priority": { + "allowedValues": [ + "Regular", + "Spot" + ], + "defaultValue": "Spot", + "metadata": { + "description": "VM priority (Spot or Regular)" + }, + "type": "string" + }, + "subnetId": { + "metadata": { + "description": "Full resource ID of the subnet" + }, + "type": "string" + }, + "tags": { + "defaultValue": {}, + "metadata": { + "description": "Tags to apply to all resources" + }, + "type": "object" + }, + "vmName": { + "metadata": { + "description": "Name of the virtual machine (provided by worker-manager)" + }, + "type": "string" + }, + "vmSize": { + "defaultValue": "Standard_F16s_v2", + "metadata": { + "description": "VM size" + }, + "type": "string" + }, + "osDiskStorageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "StandardSSD_LRS", + "Premium_LRS" + ], + "metadata": { + "description": "Base disk storage type for the ephemeral OS disk" + } + } + }, + "resources": [ + { + "apiVersion": "2023-05-01", + "condition": "[parameters('createPublicIp')]", + "location": "[parameters('location')]", + "name": "[variables('publicIpName')]", + "properties": { + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Static" + }, + "sku": { + "name": "Standard" + }, + "tags": "[parameters('tags')]", + "type": "Microsoft.Network/publicIPAddresses" + }, + { + "apiVersion": "2023-05-01", + "dependsOn": [ + "[variables('publicIpId')]" + ], + "location": "[parameters('location')]", + "name": "[variables('nicName')]", + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": "[if(parameters('createPublicIp'), variables('publicIPConfig'), json('null'))]", + "subnet": { + "id": "[parameters('subnetId')]" + } + } + } + ] + }, + "tags": "[parameters('tags')]", + "type": "Microsoft.Network/networkInterfaces" + }, + { + "apiVersion": "2025-04-01", + "dependsOn": [ + "[variables('nicId')]" + ], + "location": "[parameters('location')]", + "name": "[parameters('vmName')]", + "properties": { + "billingProfile": "[if(equals(parameters('priority'), 'Spot'), createObject('maxPrice', -1), json('null'))]", + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": false + } + }, + "evictionPolicy": "[if(equals(parameters('priority'), 'Spot'), parameters('evictionPolicy'), json('null'))]", + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[variables('nicId')]", + "properties": { + "deleteOption": "Delete" + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computerName": "[parameters('computerName')]", + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "timeZone": "UTC" + } + }, + "priority": "[parameters('priority')]", + "storageProfile": { + "imageReference": { + "id": "[parameters('imageId')]" + }, + "osDisk": { + "caching": "[parameters('osDiskCaching')]", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": "[union(createObject('option', parameters('diffDiskOption')), if(empty(parameters('diffDiskPlacement')), createObject(), createObject('placement', parameters('diffDiskPlacement'))), if(parameters('enableFullCaching'), createObject('enableFullCaching', parameters('enableFullCaching')), createObject()))]", + "managedDisk": { + "storageAccountType": "[parameters('osDiskStorageAccountType')]" + }, + "name": "[variables('osDiskName')]", + "osType": "Windows" + } + } + }, + "tags": "[parameters('tags')]", + "type": "Microsoft.Compute/virtualMachines" + } + ], + "variables": { + "nicId": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]", + "nicName": "[concat(parameters('vmName'), '-nic')]", + "osDiskName": "[concat(parameters('vmName'), '-osdisk')]", + "publicIPConfig": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpName'))]", + "properties": { + "deleteOption": "Delete" + } + }, + "publicIpId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpName'))]", + "publicIpName": "[concat(parameters('vmName'), '-ip')]" + } +} From 07de260c215e98f7263cbacb0166310212dc104f Mon Sep 17 00:00:00 2001 From: Jonathan Moss Date: Mon, 21 Sep 2026 10:12:33 -0400 Subject: [PATCH 2/2] Use the latest Compute and Network APIs for alpha --- .../template_specs/taskcluster-arm-template-alpha-1.0.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json b/terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json index f3ea421b..a52da8fa 100644 --- a/terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json +++ b/terraform/azure_fxci/template_specs/taskcluster-arm-template-alpha-1.0.json @@ -163,7 +163,7 @@ }, "resources": [ { - "apiVersion": "2023-05-01", + "apiVersion": "2026-03-01", "condition": "[parameters('createPublicIp')]", "location": "[parameters('location')]", "name": "[variables('publicIpName')]", @@ -178,7 +178,7 @@ "type": "Microsoft.Network/publicIPAddresses" }, { - "apiVersion": "2023-05-01", + "apiVersion": "2026-03-01", "dependsOn": [ "[variables('publicIpId')]" ], @@ -202,7 +202,7 @@ "type": "Microsoft.Network/networkInterfaces" }, { - "apiVersion": "2025-04-01", + "apiVersion": "2026-04-01", "dependsOn": [ "[variables('nicId')]" ],