title: How to select VM T-shirt size in Azure ARM Template
body: <p>I have a VM deloyment template where i am defining the VM size as T-Shirt Sizes for example small = Standard_DS2_v2, medium = Standard_E4s_v3 and large = Standard_E4s_v3.</p>
  
  <p>I have defined them as an array as shown below in variables section </p>
  
  <pre><code> "parameters": {
          "vmSpecs": {
              "type": "array"
          }
  },
  
  "variables": {
          "vmSizeType" :[{
              "small" : "Standard_DS2_v2",
              "medium": "Standard_E4s_v3",
              "large" : "Standard_E32s_v3"
          }]
  },
  
  "resources": [
  {
              "name": "[parameters('vmSpecs')[copyIndex()].vmName]",
              "type": "Microsoft.Compute/virtualMachines",
              "location": "[resourceGroup().location]",
              "apiVersion": "2018-06-01",
              "dependsOn": [
                  "VMNIC0Copy",
                  "[variables('storageAccountName')]"
              ],
              "copy": {
                  "name": "VMCopy",
                  "count": "[length(parameters('vmSpecs'))]"
              },
  
              "properties": {
                  "licenseType": "[parameters('vmSpecs')[copyIndex()].licenseType]",
                  "hardwareProfile": {
                      "vmSize": "[parameters('vmSpecs')variables('vmSizeType')[copyIndex()].vmSize[1]]"
                  }
  }
  </code></pre>
  
  <p>In parameters file </p>
  
  <pre><code>"vmSpecs": {
              "value": [
                  { //vm01
                      "vmName": "test",
                      "dnsDomain": "domain.com",
                      "vmSize": "medium"
                   }
             }
  </code></pre>
  
  <p>My question is how do i input vmSize and it selects the size based on what that has been defined </p>