You can add multiple extensions to Azure VMSS through the extensionProfile of ARM template. The below script shows the extension configuration and mapping workspaceId to collect custom logs from VMSS instances.
{
"name": "AxMAExtension",
"properties": {
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"workspaceKey": "[listKeys(resourceId(parameters('RGName'),'Microsoft.OperationalInsights/workspaces/', parameters('workspacename')),'2015-11-01-preview').primarySharedKey]"
},
"publisher": "Microsoft.Azure.Monitor",
"settings": {
"workspaceId": "[reference(resourceId(parameters('RGName'),'Microsoft.OperationalInsights/workspaces/', parameters('workspacename')), '2015-11-01-preview').customerId]"
},
"type": "AzureMonitorWindowsAgent",
"typeHandlerVersion": "1.0"
}
}