@MayankBargali-MSFT I figured it out myself, I see Event grid by default looks out for the Service Bus / Topic to be in same resource group. As my service bus in differnet resource group, In depends on section, I needed to add the Resource group of service bus explicitly which solved the issue . Thanks for your help anyways. I will close the ticket.
Event Grid Subscription task fails with error 'Internal server error" when creating using ARM tempalte via Azure DevOps
{
"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": "Internal error",
"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 4e7d3dd6-20bf-4473-97a0-46bdd6886dcc:8/11/2021 2:53:10 PM (UTC) to our forums for assistance or raise a support ticket ."
}
]
}
I can see the same code works for me in different Azure Subscription. I can also see the Event grid subscription gets created while task is executing and I can see it in Azure portal for a minute and then task fails and it disappears. so I somehow think its some backend problem. Any help would be great?