Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 466.6k

Validating template using powershell script fail?

Sep 17 2019 4:10 AM
Hi Team
 
I am trying to create an Azure template using CosmosDB, each time in trying to validate both azuredeploy.json and azuredeploy.parameter.json. The exception from Deploy-AzureResourceGroup.ps1. points me to this json file azuredeploy.json line 10, position 1.
[string] $TemplateParametersFile = 'azuredeploy.parameters.json',( AzureResourceGroup.ps1) => azuredeploy.json
 
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"databaseAccounts_University of Nelson Mandela_name": {
"defaultValue": "University of Nelson Mandela",
"type": "string"
}
},
"variables": {}, line 10 VS IDE
"resources": [
{
"type": "Microsoft.DocumentDB/databaseAccounts",
"apiVersion": "2015-04-08",
"name": "[parameters('databaseAccounts_University of Nelson Mandela_name')]",
"location": "West US",
"kind": "GlobalDocumentDB",
"properties": {
"enableAutomaticFailover": false,
"enableMultipleWriteLocations": false,
"isVirtualNetworkFilterEnabled": false,
"virtualNetworkRules": [],
"databaseAccountOfferType": "Standard",
"consistencyPolicy": {
"defaultConsistencyLevel": "Session",
"maxIntervalInSeconds": 5,
"maxStalenessPrefix": 100
},
"locations": [
{
"locationName": "West US",
"provisioningState": "Succeeded",
"failoverPriority": 0,
"isZoneRedundant": false
}
],
"capabilities": []
}
}
]
}
what am missing please assist me, thanks.