<p dir="auto">I've filed a new feedback item on the Azure Resource Manager (ARM) JSON Schema project page, although I believe this might have to do with how Visual Studio Code handles JSON schema validation.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="119821861" data-permission-text="Title is private" data-url="https://github.com/Azure/azure-resource-manager-schemas/issues/68" data-hovercard-type="issue" data-hovercard-url="/Azure/azure-resource-manager-schemas/issues/68/hovercard" href="https://github.com/Azure/azure-resource-manager-schemas/issues/68">Azure/azure-resource-manager-schemas#68</a></p>
<p dir="auto">I'm being told that <code class="notranslate">Microsoft.Storage/storageAccounts</code> isn't a valid top-level ARM Resource Type.</p>
<p dir="auto">Cheers,<br>
Trevor Sullivan<br>
Microsoft MVP: PowerShell</p>
<p dir="auto">The error in following JSON against schema is: "resources\properties\osProfile\computername" should be "computerName".</p>
<p dir="auto">But VS Code shows two errors here:</p>
<ol dir="auto">
<li>on "Microsoft.Compute/virtualMachines", error message is: Value is not an accepted Value. Valid values: ["Microsoft.Network/publicIPAddresses"]</li>
<li>on “properties", error message is: Missing property "publicIpAllocationMethod"</li>
</ol>
<p dir="auto">It would be good if the error can be on the "computename" or at lease on "osProfile" about missing required property "computerName", ("computerName" is a required property according to schema)</p>
<p dir="auto">JSON example:</p>
<p dir="auto">{<br>
"$schema": "<a href="https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#" rel="nofollow">https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#</a>",<br>
"contentVersion": "1.0.0.0",<br>
"resources": [<br>
{<br>
"apiVersion": "2015-06-15",<br>
"type": "Microsoft.Compute/virtualMachines",<br>
"name": "a",<br>
"location": "West US",<br>
"properties": {<br>
"hardwareProfile": {<br>
"vmSize": "Small"<br>
},<br>
"osProfile": {<br>
"computername": "a",<br>
"adminUsername": "a",<br>
"adminPassword": "a"<br>
},<br>
"storageProfile": {<br>
"imageReference": {<br>
"publisher": "a",<br>
"offer": "a",<br>
"sku": "a",<br>
"version": "latest"<br>
},<br>
"osDisk": {<br>
"name": "osdisk",<br>
"vhd": {<br>
"uri": "[concat('http://', 'b','.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"<br>
},<br>
"caching": "ReadWrite",<br>
"createOption": "FromImage"<br>
}<br>
},<br>
"networkProfile": {<br>
"networkInterfaces": [<br>
{<br>
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"<br>
}<br>
]<br>
},<br>
"diagnosticsProfile": {<br>
"bootDiagnostics": {<br>
"enabled": "true",<br>
"storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]"<br>
}<br>
}<br>
}<br>
}<br>
]<br>
}</p>