Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hubs] Register the EventGrid RP as part of the template #696

Open
flanakin opened this issue Apr 26, 2024 · 1 comment · May be fixed by #716
Open

[Hubs] Register the EventGrid RP as part of the template #696

flanakin opened this issue Apr 26, 2024 · 1 comment · May be fixed by #716
Assignees
Labels
Solution: FinOps hubs Data pipeline solution Type: Bug 🐛 Something isn't working
Milestone

Comments

@flanakin
Copy link
Contributor

🐛 Problem

Data is not ingested if someone forgets to register the EventGrid RP.

👣 Repro steps

  1. On a new subscription, confirm the EventGrid RP is not registered.
  2. Deploy the FinOps hubs template.
  3. Go to the ADF resource > Launch Studio > Manage > Triggers.
  4. Verify the msexports_FileAdded trigger is Started (it should be stopped)
  5. Start the trigger, the select the Publish all button to commit that change (this should fail)
  6. 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:

  1. Please vote this issue up (👍) to prioritize it.
  2. Leave comments to help us solidify the vision.
@flanakin flanakin added Type: Bug 🐛 Something isn't working Needs: Triage 🔍 Untriaged issue needs to be reviewed labels Apr 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Solution: FinOps hubs Data pipeline solution label Apr 26, 2024
@flanakin flanakin removed the Needs: Triage 🔍 Untriaged issue needs to be reviewed label Apr 26, 2024
@flanakin flanakin added this to the 0.4 milestone Apr 26, 2024
@flanakin flanakin removed their assignment Apr 26, 2024
@didayal-msft didayal-msft self-assigned this Apr 27, 2024
@didayal-msft
Copy link
Contributor

didayal-msft commented Apr 27, 2024

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.

@flanakin flanakin modified the milestones: May 2024, June 2024 May 25, 2024
@didayal-msft didayal-msft linked a pull request May 29, 2024 that will close this issue
@didayal-msft didayal-msft linked a pull request May 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solution: FinOps hubs Data pipeline solution Type: Bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants