[json] VS Code suggests another property when a property's casing is not correct.
The error in following JSON against schema is: "resources\properties\osProfile\computername" should be "computerName".
But VS Code shows two errors here:
- on "Microsoft.Compute/virtualMachines", error message is: Value is not an accepted Value. Valid values: ["Microsoft.Network/publicIPAddresses"]
- on “properties", error message is: Missing property "publicIpAllocationMethod"
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)
JSON example:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines",
"name": "a",
"location": "West US",
"properties": {
"hardwareProfile": {
"vmSize": "Small"
},
"osProfile": {
"computername": "a",
"adminUsername": "a",
"adminPassword": "a"
},
"storageProfile": {
"imageReference": {
"publisher": "a",
"offer": "a",
"sku": "a",
"version": "latest"
},
"osDisk": {
"name": "osdisk",
"vhd": {
"uri": "[concat('http://', 'b','.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": "true",
"storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]"
}
}
}
}
]
}
fix delivered
@aeschli @wenwu449 Can this fix be targeted at a milestone? I'm trying to understand when this would be released, as it is a major roadblock for authoring Azure Resource Manager (ARM) JSON Templates.
Sorry, the milestone was missing. Fix already got delivered a while ago