e.g. I want to be able to add something like this to the template
{
"apiVersion": "2020-04-01",
"name": "[concat('NetworkWatcher_', variables('monitorRegion'), '/', variables('networkMonitorName'), '/app-1' )]",
"location": "westus2",
"type": "Microsoft.Network/networkWatchers/connectionMonitors/connectionMonitorEndpoint",
"properties": {
"name": "[reference(resourceId(variables('appResourceGroupName'), 'Microsoft.Compute/virtualMachines', concat(variables('deploymentName'), '-app-1')), '2020-06-01').osProfile.computername]",
"type": "AzureVM",
"resourceId": "[resourceId(variables('appResourceGroupName'), 'Microsoft.Compute/virtualMachines', concat(variables('deploymentName'), '-app-1'))]"
}
}
( where I would replace the app-1 with app-', copyIndex() )
but that seems to not work. I get the following error.
Deployment failed. Correlation ID: e8c249ce-04a8-4245-9b0e-17c38bf85be6. {
"Message": "No HTTP resource was found that matches the request URI 'https://westus2.network.azure.com:30004/...../subscriptions/.../resourcegroups/NetworkWatcherRG/providers/Microsoft.Network/networkWatchers/NetworkWatcher_westus2/connectionMonitors/rl0-davedev2-networkMonitor1/connectionMonitorEndpoint/app-1?api-version=2020-04-01'."