Skip to content

Instantly share code, notes, and snippets.

@paulmey
Last active May 2, 2017 18:37
Show Gist options
  • Save paulmey/775c197c5e6857ed08e61ae6494aacaa to your computer and use it in GitHub Desktop.
Save paulmey/775c197c5e6857ed08e61ae6494aacaa to your computer and use it in GitHub Desktop.
Create managed disk from platform image
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"diskName": {
"type": "string"
},
"imageUri": {
"type": "string"
},
"storageAccountType" : {
"type": "string",
"defaultValue": "Premium_LRS"
}
},
"variables": {
"location": "[resourceGroup().location]",
"computeResouresApiVersion" : "2016-04-30-preview"
},
"resources": [
{
"apiVersion": "[variables('computeResouresApiVersion')]",
"type": "Microsoft.Compute/disks",
"name": "[parameters('diskName')]",
"location": "[variables('location')]",
"properties":
{
"creationData":
{
"createOption": "FromImage",
"imageReference": {
"id": "[parameters('imageUri')]"
}
},
"accountType": "[parameters('storageAccountType')]"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment