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