Unable to deploy multiple eventSubscription resources; first one always succeeds, but the subsequent ones fail with "Conflict" error

Verbitsky, Lev 11 Reputation points
2021-05-06T15:10:02.337+00:00

We are trying to deploy Microsoft.EventGrid/systemTopics resource, which contains several Microsoft.EventGrid/systemTopics/EventSubscriptions resources.

We have no problem deploying the the system topic resource, as well as ONE subscription; however, the subsequent subscriptions always fail with "Conflict" error. We have tried both serial and parallel deployment - it fails with serial as well.

Attached please see the screenshots of the error itself from the portal. The error itself looks like that:

{
"status": "Failed",
"error": {
"code": "Publisher Notification Error",
"message": "Failed to enable publisher notifications.",
"details": [
{
"code": "Publisher Provider Error",
"message": "PUT request for https://management.azure.com/subscriptions/[subscriptionid]/resourceGroups/xio-bicep-resg/providers/microsoft.devices/iothubs/[hubname]/eventGridFilters/event-subscription?api-version=2018-01-15-preview failed with status code: Conflict, code: and message: ."
}
]
}
}
94328-screen-shot-2021-05-06-at-104811-am.png
94494-screen-shot-2021-05-06-at-110157-am.png

Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
331 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 69,841 Reputation points
    2021-05-07T04:18:47.323+00:00

    Hi @Verbitsky, Lev

    Welcome to Microsoft Q&A! Thanks for posting the question.

    As per the error message while creating the second event grid subscription you are receiving the conflict (409) error.
    Only one operation can be performed for the same resource at a time. Please make sure you are having the resource dependency using dependson

    • EventGridSubcription1 depends on eventgridtopic
    • EvenetGridSubscription2 depends on eventgridtopic and EventGridSubcription1 Hope the above helps you to resolve the issue. If not please share the ARM template so I can assist you further.
    0 comments No comments