From f30f4ac91d4b651d949142c7278bc5557115fcbf Mon Sep 17 00:00:00 2001 From: Jeffrey Cline Date: Fri, 2 Mar 2018 14:15:24 -0800 Subject: [PATCH] Updated per PR --- .../createUiDefinition.json | 48 ++++++++++++++++++- .../vm-linux-terraform/mainTemplate.json | 13 +++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/solution_template/vm-linux-terraform/createUiDefinition.json b/solution_template/vm-linux-terraform/createUiDefinition.json index a8a45023..b2642a36 100644 --- a/solution_template/vm-linux-terraform/createUiDefinition.json +++ b/solution_template/vm-linux-terraform/createUiDefinition.json @@ -57,6 +57,51 @@ } ], "steps": [ + { + "name": "firstStep", + "label": "Additional Settings", + "bladeTitle": "Additional Settings", + "subLabel": { + "preValidation": "", + "postValidation": "Done" + }, + "elements": [ + { + "name": "vmSize", + "type": "Microsoft.Compute.SizeSelector", + "label": "Size", + "toolTip": "", + "recommendedSizes": [ + "Standard_DS2_v2", + "Standard_DS1_v2", + "Standard_DS11_v2" + ], + "osPlatform": "Linux", + "count": 1, + "visible": true + }, + { + "name": "vmDiskType", + "type": "Microsoft.Common.OptionsGroup", + "label": "VM disk type", + "defaultValue": "SSD", + "toolTip": "Premium disks (SSD) are backed by solid state drives and offer consistent, low-latency performance. They provide the best balance between price and performance, and are ideal for I/O-intensive applications and production workloads. Standard disks (HDD) are backed by magnetic drives and are preferable for applications where data is accessed infrequently.", + "constraints": { + "allowedValues": [ + { + "label": "SSD", + "value": "Premium_LRS" + }, + { + "label": "HDD", + "value": "Standard_LRS" + } + ] + }, + "visible": true + } + ] + } ], "outputs": { "adminPassword": "[basics('authType').password]", @@ -64,7 +109,8 @@ "adminUserName": "[basics('userName')]", "authenticationType": "[basics('authType').authenticationType]", "vmName": "[basics('vmName')]", - "vmSize": "Standard_D1_V2", + "vmSize": "[steps('firstStep').vmSize]", + "storageAccountType": "[steps('firstStep').vmDiskType]", "location": "[location()]" } } diff --git a/solution_template/vm-linux-terraform/mainTemplate.json b/solution_template/vm-linux-terraform/mainTemplate.json index 1c6ac4b4..628e80ac 100644 --- a/solution_template/vm-linux-terraform/mainTemplate.json +++ b/solution_template/vm-linux-terraform/mainTemplate.json @@ -63,6 +63,13 @@ }, "type": "string", "defaultValue": "Standard_DS1_v2" + }, + "storageAccountType": { + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Storage Account Type" + }, + "type": "string" } }, "variables": { @@ -241,6 +248,12 @@ "offer": "UbuntuServer", "sku": "16.04-LTS", "version": "latest" + }, + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('storageAccountType')]" + } } }, "networkProfile": {