github.phpd.cn/hashicorp/packer@v1.3.2/builder/azure/arm/TestVirtualMachineDeployment05.approved.txt (about) 1 { 2 "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", 3 "contentVersion": "1.0.0.0", 4 "parameters": { 5 "adminPassword": { 6 "type": "string" 7 }, 8 "adminUsername": { 9 "type": "string" 10 }, 11 "dnsNameForPublicIP": { 12 "type": "string" 13 }, 14 "osDiskName": { 15 "type": "string" 16 }, 17 "storageAccountBlobEndpoint": { 18 "type": "string" 19 }, 20 "vmName": { 21 "type": "string" 22 }, 23 "vmSize": { 24 "type": "string" 25 } 26 }, 27 "resources": [ 28 { 29 "apiVersion": "[variables('apiVersion')]", 30 "dependsOn": [], 31 "location": "[variables('location')]", 32 "name": "[variables('nicName')]", 33 "properties": { 34 "ipConfigurations": [ 35 { 36 "name": "ipconfig", 37 "properties": { 38 "privateIPAllocationMethod": "Dynamic", 39 "subnet": { 40 "id": "[variables('subnetRef')]" 41 } 42 } 43 } 44 ] 45 }, 46 "type": "Microsoft.Network/networkInterfaces" 47 }, 48 { 49 "apiVersion": "[variables('apiVersion')]", 50 "dependsOn": [ 51 "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" 52 ], 53 "location": "[variables('location')]", 54 "name": "[parameters('vmName')]", 55 "properties": { 56 "diagnosticsProfile": { 57 "bootDiagnostics": { 58 "enabled": false 59 } 60 }, 61 "hardwareProfile": { 62 "vmSize": "[parameters('vmSize')]" 63 }, 64 "networkProfile": { 65 "networkInterfaces": [ 66 { 67 "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" 68 } 69 ] 70 }, 71 "osProfile": { 72 "adminPassword": "[parameters('adminPassword')]", 73 "adminUsername": "[parameters('adminUsername')]", 74 "computerName": "[parameters('vmName')]", 75 "linuxConfiguration": { 76 "ssh": { 77 "publicKeys": [ 78 { 79 "keyData": "", 80 "path": "[variables('sshKeyPath')]" 81 } 82 ] 83 } 84 } 85 }, 86 "storageProfile": { 87 "osDisk": { 88 "caching": "ReadWrite", 89 "createOption": "FromImage", 90 "image": { 91 "uri": "https://localhost/custom.vhd" 92 }, 93 "name": "[parameters('osDiskName')]", 94 "osType": "Linux", 95 "vhd": { 96 "uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]" 97 } 98 } 99 } 100 }, 101 "type": "Microsoft.Compute/virtualMachines" 102 } 103 ], 104 "variables": { 105 "addressPrefix": "10.0.0.0/16", 106 "apiVersion": "2015-06-15", 107 "location": "[resourceGroup().location]", 108 "publicIPAddressType": "Dynamic", 109 "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", 110 "subnetAddressPrefix": "10.0.0.0/24", 111 "subnetName": "ignore", 112 "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", 113 "virtualNetworkName": "ignore", 114 "virtualNetworkResourceGroup": "ignore", 115 "vmStorageAccountContainerName": "images", 116 "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" 117 } 118 }