An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
Hello Rifatul Islam,
Thank you for reaching out regarding the issue with starting the Storage Event Trigger using the .NET SDK.
Summary of the Issue
We understand that when invoking StartAsync() on an Azure Data Factory Storage Event Trigger, the operation intermittently fails with the error:
"Resource cannot be updated during provisioning"
even after incorporating delays or retries.
This behavior is related to the underlying dependency between Azure Data Factory Storage Event Triggers and Azure Event Grid subscriptions.
When a Storage Event Trigger is created or updated:
An associated Event Grid subscription is provisioned asynchronously in the backend.
While the Azure Resource Manager (ARM) operation may complete successfully, the Event Grid subscription can still be in a provisioning state.
During this time, the resource is internally locked, and any subsequent operations such as StartAsync() may fail with:
"Resource cannot be updated during provisioning"
At present, the .NET SDK StartAsync() method only tracks ARM-level completion and does not account for the backend provisioning status of the Event Grid subscription. Additionally, there is no exposed SDK property to validate this provisioning state.
Recommended Approach:
To mitigate this issue, we recommend the following:
Implement Retry Logic with Exponential Backoff
Handle the specific provisioning error and retry the StartAsync() operation after a delay (for example, 15–30 seconds, increasing gradually).
Introduce a Stabilization Delay
After creating or updating the trigger, allow a buffer time (typically 1–2 minutes) before invoking StartAsync().
Ensure Idempotent Operations
Design your implementation so repeated StartAsync() calls do not cause unintended side effects.
Portal Validation (Optional for Testing)
In the Azure Portal, verify whether the Event Subscription shows a status such as “Updating”. Once this completes, the trigger start operation should succeed.
Additional Notes
This is a known behavior due to eventual consistency between ARM and downstream resource providers. While this may appear intermittent, it is dependent on backend provisioning timelines within Event Grid.
Conclusion
The observed failure is not indicative of an issue with your implementation, but rather a timing dependency on Event Grid provisioning. Incorporating retry logic and a short delay before starting the trigger should help ensure consistent success.
This is not a bug in your implementation, but a timing gap between ARM and Event Grid provisioning. Since the SDK does not expose Event Grid readiness, the most reliable approach is retry with backoff + slight delay before starting the trigger.
Please accept as answer and do a Thumbs-up to upvote this response if you are satisfied with the community help. Your upvote will be beneficial for the community users facing similar issues.