When I try to deploy variable to Azure Automation assets, I got and error and can't deploy my resource.
Suppose this template
{
"name": "myVariable",
"type": "Microsoft.Automation/automationAccounts/variables",
"apiVersion": "2015-10-31",
"dependsOn": [
"[resourceId('Microsoft.Automation/automationAccounts', variables('automationAccountName'))]"
],
"location": "[variables('automationLocation')]",
"properties": {
"isEncrypted": "false",
"value": "8f703df8-0448-4ee3-8629-fc3f01840683"
}
}
Deployment throw me the exception :
{\"Message\":\"The request is invalid.\",\"ModelState\":{\"variable.properties.value\":[\"Invalid JSON primitive: a7d14fb0-232e-4fa0-a748-c7c8fb2082e2.\"]}}
I have also try with :
"value": "\"8f703df8-0448-4ee3-8629-fc3f01840683\""
But any attempt fail!
Anyone know how to provisioning Variable Assets with ARM template ?
Looking at the examples you should escape the quotes:
{
"name": "sampleVariable",
"properties": {
"value": "\"ComputerName.domain.com\"",
"description": "my description",
"isEncrypted": false
}
}