ARM template array parameter
I used the following using an array parameter:
parameter declaration:
"customEmails": { "type": "array", "metadata": { "description": "alert email addressess" }}
in the parameters file:
"customEmails": { "value": [ "email1@domain.com", "email2@domain.com" ] }
usage:
"customEmails": "[parameters('customEmails')]"
I found a solution. The main problem was that my comma separated list of e-mail addresses had a space after each comma.
The way I have implemented it now is like this:
Define a string parameter with a comma separated list of e-mail addresses. Don't have spaces in the list.
Define a variable like this:
"customEmails" : "[split(parameters('AlertEmailRecipients'), ',')]"
and then reference that variable in the alerting action:
"action": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", "sendToServiceOwners": false, "customEmails": "[variables('customEmails')]"}
The example actually does this, but doesn't make it clear the the list of e-mails can't contain spaces.