I download the 'Automation Script' from Azure Resource Manager Portal and here is a snippet of it:
{
"$schema": "xxxxs://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualMachines_ICB_Jumpbox_name": {
"defaultValue": "ICB-Jumpbox",
"type": "String"
},
When I open the template.json file from the downloaded Zip file in Visual Studio Code it finds errors because
"type": "String"
uses a capital 'S' rather than a lowercase 's'.
If I copy the warning in VS Code it is this:
file: 'file:///c%3A/IB/AzureRepos/Jumpbox/template.json'
severity: 'Warning'
message: 'Value is not accepted. Valid values: ["string","securestring","int","bool","object","secureObject","array"]'
at: '7,21'
source: ''
As can be seen this is because VS Code is expecting "string" not "String".
I am don't know for sure which is correct but since Azure doesn't care about capitalisation the simplest solution would be seem to be to edit the file that forms the error checking in VS Code to let VS Code know that "String" is equally valid.
Alternatively escalate to the Azure team to have them create Automation Scripts with JSON formatted with lowercase.
In the meantime I can ignore the errors (or edit String to string) but if anyone has a good way to remove the errors by editing the error checking file in VS Code please let me know.
Thanks, Ian