github.com/rahart/packer@v0.12.2-0.20161229105310-282bb6ad370f/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment04.approved.json (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 "location": "[variables('location')]", 31 "name": "[variables('publicIPAddressName')]", 32 "properties": { 33 "dnsSettings": { 34 "domainNameLabel": "[parameters('dnsNameForPublicIP')]" 35 }, 36 "publicIPAllocationMethod": "[variables('publicIPAddressType')]" 37 }, 38 "type": "Microsoft.Network/publicIPAddresses" 39 }, 40 { 41 "apiVersion": "[variables('apiVersion')]", 42 "location": "[variables('location')]", 43 "name": "[variables('virtualNetworkName')]", 44 "properties": { 45 "addressSpace": { 46 "addressPrefixes": [ 47 "[variables('addressPrefix')]" 48 ] 49 }, 50 "subnets": [ 51 { 52 "name": "[variables('subnetName')]", 53 "properties": { 54 "addressPrefix": "[variables('subnetAddressPrefix')]" 55 } 56 } 57 ] 58 }, 59 "type": "Microsoft.Network/virtualNetworks" 60 }, 61 { 62 "apiVersion": "[variables('apiVersion')]", 63 "dependsOn": [ 64 "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", 65 "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" 66 ], 67 "location": "[variables('location')]", 68 "name": "[variables('nicName')]", 69 "properties": { 70 "ipConfigurations": [ 71 { 72 "name": "ipconfig", 73 "properties": { 74 "privateIPAllocationMethod": "Dynamic", 75 "publicIPAddress": { 76 "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" 77 }, 78 "subnet": { 79 "id": "[variables('subnetRef')]" 80 } 81 } 82 } 83 ] 84 }, 85 "type": "Microsoft.Network/networkInterfaces" 86 }, 87 { 88 "apiVersion": "[variables('apiVersion')]", 89 "dependsOn": [ 90 "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" 91 ], 92 "location": "[variables('location')]", 93 "name": "[parameters('vmName')]", 94 "properties": { 95 "diagnosticsProfile": { 96 "bootDiagnostics": { 97 "enabled": false 98 } 99 }, 100 "hardwareProfile": { 101 "vmSize": "[parameters('vmSize')]" 102 }, 103 "networkProfile": { 104 "networkInterfaces": [ 105 { 106 "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" 107 } 108 ] 109 }, 110 "osProfile": { 111 "adminPassword": "[parameters('adminPassword')]", 112 "adminUsername": "[parameters('adminUsername')]", 113 "computerName": "[parameters('vmName')]", 114 "linuxConfiguration": { 115 "ssh": { 116 "publicKeys": [ 117 { 118 "keyData": "", 119 "path": "[variables('sshKeyPath')]" 120 } 121 ] 122 } 123 } 124 }, 125 "storageProfile": { 126 "osDisk": { 127 "caching": "ReadWrite", 128 "createOption": "FromImage", 129 "image": { 130 "uri": "https://localhost/custom.vhd" 131 }, 132 "name": "osdisk", 133 "osType": "Linux", 134 "vhd": { 135 "uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]" 136 } 137 } 138 } 139 }, 140 "type": "Microsoft.Compute/virtualMachines" 141 } 142 ], 143 "variables": { 144 "addressPrefix": "10.0.0.0/16", 145 "apiVersion": "2015-06-15", 146 "location": "[resourceGroup().location]", 147 "nicName": "packerNic", 148 "publicIPAddressName": "packerPublicIP", 149 "publicIPAddressType": "Dynamic", 150 "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", 151 "subnetAddressPrefix": "10.0.0.0/24", 152 "subnetName": "packerSubnet", 153 "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", 154 "virtualNetworkName": "packerNetwork", 155 "virtualNetworkResourceGroup": "[resourceGroup().name]", 156 "vmStorageAccountContainerName": "images", 157 "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" 158 } 159 }