I am defining an alertrule inside my template.json with custom eMails which shall be alerted in case of an error. So the JSON snippet looks like this:
"resources": [
{
"type": "microsoft.insights/alertrules",
"properties": {
"action": {
"customEmails": [
"user01@contoso.com",
"user02@contoso.com"
]
}
}
}
]
Now I'd like to store these emails as an array-variable, something like this:
"variables": {
"alertEmails": [
"user01@contoso.com",
"user02@contoso.com"
]
},
"resources": [
{
"type": "microsoft.insights/alertrules",
"properties": {
"action": {
"customEmails": "[variables('alertEmails')]"
}
}
}
]
This doesn't work, but I didn't found out what the correct syntax is. Can someone tell me?