I am building a deployment template in order to deploy an Azure Container. I have a separate json file for the parameters. I the parameters file I am getting the error "Unknown schema: https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#arm-template (schema)"
I have include the two templates below. First the deployment template. Then below that, the parameters template.
Here is my deployment template:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "string",
"metadata": {
"description": "Storage Account Name"
}
},
"fileShareName": {
"type": "string",
"metadata": {
"description": "Name of existing file share to be mounted"
}
},
"host": {
"type": "string",
"metadata": {
"description": "URL to test."
}
},
"numberOfInstances": {
"type": "int",
"metadata": {
"description": "Number of instances of Container Group to deploy"
}
}
},
"functions": [],
"variables": {
"storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
},
"resources": [
{
"name": "locustcg-01",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-10-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]"
],
"properties": {
"containers": [
{
"name": "locustci-01",
"properties": {
"image": "demolocustcr.azurecr.io/locust",
"ports": [
{
"port": 8089
},
{
"port": 5557
}
],
"command": [
"locust",
"--locustfile",
"/home/locust/locust/locustfile.py",
"--host",
"https://jsonplaceholder.typicode.com"
],
"volumeMounts": [
{
"mountPath": "/home/locust/locust",
"name": "locust"
}
],
"resources": {
"requests": {
"cpu": 1,
"memoryInGB": 2
}
}
}
}
],
"osType": "Linux",
"restartPolicy": "OnFailure",
"volumes": [
{
"name": "locust",
"azureFile": {
"shareName": "locustfs",
"storageAccountName": "[parameters('storageAccountName')]",
"storageAccountKey": "[
listKeys(variables('storageAccountId'),'2018-02-01').keys[0].value
]"
}
}
]
}
}
],
"outputs": {
"locustMonitor": {
"type": "string",
"value": "[concat('http://', reference(resourceId('Microsoft.ContainerInstance/containerGroups/', 'locustcg-01')).ipAddress.ip, ':8089')]"
}
}
}
Here is the parameters template:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"value": "locustst01"
},
"fileShareName": {
"value": "locustfs"
},
"host": {
"value": "https://jsonplaceholder.typicode.com"
},
"numberOfInstances": {
"value": "1"
}
}
}