[Hubs] Register the EventGrid RP as part of the template
đ Problem
Data is not ingested if someone forgets to register the EventGrid RP.
đŖ Repro steps
- On a new subscription, confirm the EventGrid RP is not registered.
- Deploy the FinOps hubs template.
- Go to the ADF resource > Launch Studio > Manage > Triggers.
- Verify the msexports_FileAdded trigger is Started (it should be stopped)
- Start the trigger, the select the Publish all button to commit that change (this should fail)
- Open the notifications pane and select View details to see why it failed
The error should explain that the EventGrid RP hasn't been registered.
đ¤ Expected
Automate the EventGrid RP registration as part of template deployment.
âšī¸ Additional context
While ARM does a good job of registering RPs for resources that are included in a template, ADF creates the EventGrid resource behind the scenes when the trigger is started. ADF doesn't register the RP, so it needs to be done explicitly.
We need to investigate if there is a way to declare some RP is needed as part of the template so ARM will auto-register. If not, we can create a script that registers the desired RPs. We can leverage the Initialize-FinOpsHubDeployment command if deployment scripts support installing modules from the PowerShell gallery. Alternatively, we just do the direct RP registration ourselves. The nice part about using our command is that it will cover any new pre-deployment steps that come up over time.
đââī¸ Ask for the community
We could use your help:
- Please vote this issue up (đ) to prioritize it.
- Leave comments to help us solidify the vision.
Will have to go the PowerShell route but access level on subscription to register is an issue since script deployment resource must use a user mi for az commands and that mi must have the subscription level rights to register resource providers.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types#register-resource-provider mentions that the provider must be registered manually if one resource type creates another.
"Sometimes, a resource in the template requires supporting resources that aren't in the template. Common examples are monitoring or security resources. You need to register those resource providers manually."
Cannot use powershell to register RP. in a resource group level deployment. Hence, registering provider by creating a namespace and then cleaning it up.