Last active
March 16, 2016 08:59
-
-
Save torumakabe/178bcb4eca2f4317a495 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "adminUsername": { | |
| "type": "string", | |
| "metadata": { | |
| "description": "User name for the Virtual Machine." | |
| } | |
| }, | |
| "adminPassword": { | |
| "type": "securestring", | |
| "metadata": { | |
| "description": "Password for the Virtual Machine." | |
| } | |
| }, | |
| "dnsLabelPrefix": { | |
| "type": "string", | |
| "metadata": { | |
| "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." | |
| } | |
| }, | |
| "ubuntuOSVersion": { | |
| "type": "string", | |
| "defaultValue": "14.04.3-LTS", | |
| "allowedValues": [ | |
| "12.04.5-LTS", | |
| "14.04.3-LTS", | |
| "15.10" | |
| ], | |
| "metadata": { | |
| "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.10." | |
| } | |
| } | |
| }, | |
| "variables": { | |
| "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'salinuxvm')]", | |
| "location": "[resourceGroup().location]", | |
| "dataDisk1VhdName": "datadisk1", | |
| "imagePublisher": "Canonical", | |
| "imageOffer": "UbuntuServer", | |
| "OSDiskName": "osdiskforlinuxsimple", | |
| "nicName": "myVMNic", | |
| "addressPrefix": "10.0.0.0/16", | |
| "subnetName": "Subnet", | |
| "subnetPrefix": "10.0.0.0/24", | |
| "storageAccountType": "Standard_LRS", | |
| "publicIPAddressName": "myPublicIP", | |
| "publicIPAddressType": "Dynamic", | |
| "vmStorageAccountContainerName": "vhds", | |
| "vmName": "MyUbuntuVM", | |
| "vmSize": "Standard_D1", | |
| "virtualNetworkName": "MyVNET", | |
| "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", | |
| "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", | |
| "apiVersion": "2015-06-15" | |
| }, | |
| "resources": [ | |
| { | |
| "type": "Microsoft.Storage/storageAccounts", | |
| "name": "[variables('storageAccountName')]", | |
| "apiVersion": "[variables('apiVersion')]", | |
| "location": "[variables('location')]", | |
| "tags": { | |
| "Immutable": "True" | |
| }, | |
| "properties": { | |
| "accountType": "[variables('storageAccountType')]" | |
| } | |
| }, | |
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Network/publicIPAddresses", | |
| "name": "[variables('publicIPAddressName')]", | |
| "location": "[variables('location')]", | |
| "tags": { | |
| "Immutable": "True" | |
| }, | |
| "properties": { | |
| "publicIPAllocationMethod": "[variables('publicIPAddressType')]", | |
| "dnsSettings": { | |
| "domainNameLabel": "[parameters('dnsLabelPrefix')]" | |
| } | |
| } | |
| }, | |
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Network/virtualNetworks", | |
| "name": "[variables('virtualNetworkName')]", | |
| "location": "[variables('location')]", | |
| "tags": { | |
| "Immutable": "True" | |
| }, | |
| "properties": { | |
| "addressSpace": { | |
| "addressPrefixes": [ | |
| "[variables('addressPrefix')]" | |
| ] | |
| }, | |
| "subnets": [ | |
| { | |
| "name": "[variables('subnetName')]", | |
| "properties": { | |
| "addressPrefix": "[variables('subnetPrefix')]" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Network/networkInterfaces", | |
| "name": "[variables('nicName')]", | |
| "location": "[variables('location')]", | |
| "tags": { | |
| "Immutable": "True" | |
| }, | |
| "dependsOn": [ | |
| "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", | |
| "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" | |
| ], | |
| "properties": { | |
| "ipConfigurations": [ | |
| { | |
| "name": "ipconfig1", | |
| "properties": { | |
| "privateIPAllocationMethod": "Dynamic", | |
| "publicIPAddress": { | |
| "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" | |
| }, | |
| "subnet": { | |
| "id": "[variables('subnetRef')]" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "apiVersion": "[variables('apiVersion')]", | |
| "type": "Microsoft.Compute/virtualMachines", | |
| "name": "[variables('vmName')]", | |
| "location": "[variables('location')]", | |
| "tags": { | |
| "Immutable": "True", | |
| "ReadyToRemove": "False" | |
| }, | |
| "dependsOn": [ | |
| "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", | |
| "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" | |
| ], | |
| "properties": { | |
| "hardwareProfile": { | |
| "vmSize": "[variables('vmSize')]" | |
| }, | |
| "osProfile": { | |
| "computerName": "[variables('vmName')]", | |
| "adminUsername": "[parameters('adminUsername')]", | |
| "adminPassword": "[parameters('adminPassword')]" | |
| }, | |
| "storageProfile": { | |
| "imageReference": { | |
| "publisher": "[variables('imagePublisher')]", | |
| "offer": "[variables('imageOffer')]", | |
| "sku": "[parameters('ubuntuOSVersion')]", | |
| "version": "latest" | |
| }, | |
| "osDisk": { | |
| "name": "osdisk", | |
| "vhd": { | |
| "uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" | |
| }, | |
| "caching": "ReadWrite", | |
| "createOption": "FromImage" | |
| }, | |
| "dataDisks": [ | |
| { | |
| "name": "datadisk1", | |
| "diskSizeGB": "100", | |
| "lun": 0, | |
| "vhd": { | |
| "uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('dataDisk1VhdName'),'.vhd')]" | |
| }, | |
| "createOption": "Empty" | |
| } | |
| ] | |
| }, | |
| "networkProfile": { | |
| "networkInterfaces": [ | |
| { | |
| "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" | |
| } | |
| ] | |
| }, | |
| "diagnosticsProfile": { | |
| "bootDiagnostics": { | |
| "enabled": "true", | |
| "storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment