I want to create actionGroups via ARM template. And I did not find how to reference webhookResourceId.
{
"apiVersion": "2019-06-01",
"type": "microsoft.insights/actionGroups",
"location": "Global",
"name": "[variables('ActionGroupCallRunBook')]",
"properties": {
"enabled": true,
"automationRunbookReceivers": [
{
"name": "[concat('webhook-',variables('ActionGroupCallRunBook'))]",
"automationAccountId": "[resourceId('microsoft.insights/components', parameters('AzureTelemetryName'))]",
"runbookName": "myRunbook",
"webhookResourceId": "[resourceId('Microsoft.Automation/automationAccounts/webhooks'), parameters('WebHookOnRunBookName')]",
"isGlobalRunbook": false,
"useCommonAlertSchema": false
}
]
},
"tags": {
"displayName": "ActionGroupCallRunBook"
}
}
"webhookResourceId": "[resourceId('Microsoft.Automation/automationAccounts/webhooks'), parameters('WebHookOnRunBookName')]" return an error!
right, because you'd have to use resourceId()
like so:
resourceId('Microsoft.Automation/automationAccounts/webhooks', 'automationaccountname`, 'webhookname`)