github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.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('publicIPAddressApiVersion')]", 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('networkInterfacesApiVersion')]", 42 "dependsOn": [ 43 "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" 44 ], 45 "location": "[variables('location')]", 46 "name": "[variables('nicName')]", 47 "properties": { 48 "ipConfigurations": [ 49 { 50 "name": "ipconfig", 51 "properties": { 52 "privateIPAllocationMethod": "Dynamic", 53 "publicIPAddress": { 54 "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" 55 }, 56 "subnet": { 57 "id": "[variables('subnetRef')]" 58 } 59 } 60 } 61 ] 62 }, 63 "type": "Microsoft.Network/networkInterfaces" 64 }, 65 { 66 "apiVersion": "[variables('apiVersion')]", 67 "dependsOn": [ 68 "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" 69 ], 70 "location": "[variables('location')]", 71 "name": "[parameters('vmName')]", 72 "properties": { 73 "diagnosticsProfile": { 74 "bootDiagnostics": { 75 "enabled": false 76 } 77 }, 78 "hardwareProfile": { 79 "vmSize": "[parameters('vmSize')]" 80 }, 81 "networkProfile": { 82 "networkInterfaces": [ 83 { 84 "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" 85 } 86 ] 87 }, 88 "osProfile": { 89 "adminPassword": "[parameters('adminPassword')]", 90 "adminUsername": "[parameters('adminUsername')]", 91 "computerName": "[parameters('vmName')]", 92 "linuxConfiguration": { 93 "ssh": { 94 "publicKeys": [ 95 { 96 "keyData": "", 97 "path": "[variables('sshKeyPath')]" 98 } 99 ] 100 } 101 } 102 }, 103 "storageProfile": { 104 "imageReference": { 105 "offer": "--image-offer--", 106 "publisher": "--image-publisher--", 107 "sku": "--image-sku--", 108 "version": "--version--" 109 }, 110 "osDisk": { 111 "caching": "ReadWrite", 112 "createOption": "fromImage", 113 "managedDisk": { 114 "storageAccountType": "Standard_LRS" 115 }, 116 "name": "osdisk", 117 "osType": "Linux" 118 } 119 } 120 }, 121 "type": "Microsoft.Compute/virtualMachines" 122 } 123 ], 124 "variables": { 125 "addressPrefix": "10.0.0.0/16", 126 "apiVersion": "2017-03-30", 127 "location": "[resourceGroup().location]", 128 "managedDiskApiVersion": "2017-03-30", 129 "networkInterfacesApiVersion": "2017-04-01", 130 "nicName": "packerNic", 131 "publicIPAddressApiVersion": "2017-04-01", 132 "publicIPAddressName": "packerPublicIP", 133 "publicIPAddressType": "Dynamic", 134 "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", 135 "subnetAddressPrefix": "10.0.0.0/24", 136 "subnetName": "--virtual_network_subnet_name--", 137 "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", 138 "virtualNetworkName": "--virtual_network_name--", 139 "virtualNetworkResourceGroup": "--virtual_network_resource_group_name--", 140 "virtualNetworksApiVersion": "2017-04-01", 141 "vmStorageAccountContainerName": "images", 142 "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" 143 } 144 }