I'm trying to deploy a subscription for my system event grid topic in bicep but I'm running into the following error:
ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"Internal error\",\r\n \"message\": \"The operation failed due to an internal server error. The initial state of the impacted resources (if any) are restored. Please try again in few minutes. If error still persists, report cbed589a-559e-4484-9694-e3ec71dbadfe:12/16/2021 12:50:41 AM (UTC) to our forums for assistance or raise a support ticket .\"\r\n }\r\n ]\r\n }\r\n}"}]}}
I have tried creating a new topic and I'm still having the same issue. Below in my bicep code:
/ System event grid subscriptions
resource datalakeSystemEventGrid 'Microsoft.EventGrid/systemTopics@2020-04-01-preview' existing = {
name: 'evgst-${projectName}-dlspapertracking'
}
resource sendImportCompletedEventSubscription 'Microsoft.EventGrid/systemTopics/eventSubscriptions@2020-04-01-preview' = {
name: 'sendImportCompletedEventSubscription'
parent: datalakeSystemEventGrid
properties: {
destination: {
endpointType: 'AzureFunction'
properties: {
resourceId: '${functionApp.id}/functions/send_import_completed_event'
maxEventsPerBatch: 1
preferredBatchSizeInKilobytes: 64
}
}
filter: {
includedEventTypes: [
'Microsoft.Storage.BlobRenamed'
'Microsoft.Storage.BlobCreated'
]
subjectBeginsWith: '/blobServices/default/containers/machine-data/blobs/CompletedImports'
}
eventDeliverySchema: 'EventGridSchema'
retryPolicy: {
maxDeliveryAttempts: 3
eventTimeToLiveInMinutes: 120
}
}
}