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

Microsoft.ManagedServices/registrationAssignment Aliases Potentially non-functional #4005

Open
ralflarsen opened this issue Jun 6, 2024 · 1 comment
Labels
bug Something isn't working Pri3

Comments

@ralflarsen
Copy link

I've recently had to spend far too long getting an Azure Policy to deploy Lighthouse delegations to resource groups in subscriptions.

The major problem I encountered was that when creating policy to use DeployIfNotExists to deploy registrationAssignment objects, I was trying to use some of the aliases derived from the registrationDefinition which the registrationAssignment was assigning, aliases such as:

registrationAssignment/registrationDefinition.id
registrationAssignment/registrationDefinition.name
and so on.

It transpires that when you deploy a registrationAssignment via an ARM template, the only definition-related attribute which gets populated on the registrationAssignment object is actually registrationAssignment.registrationDefinitionId. The attributes on the 'embedded' registrationDefinition do not get populated and so the aliases targeting them do not work.

I have not tried every method to create registrationAssignments, it could be under some circumstances, e.g. via the Azure Portal, that these attributes do get filled. However in the scenario where you're using Portal, you're far less likely to be using Policy to deploy Lighthouse delegations in the first place.

I would suggest that someone needs to work out if there are situations where the registrationAssignment/registrationDefinintion.XXX attributes are filled in. If there are scenarios, then the documentation should be updated to reflect when these can be used, and when they are blank.
If there are actually no scenarios in which these attributes are filled, then I'd suggest the aliases are removed.

@ralflarsen ralflarsen added the bug Something isn't working label Jun 6, 2024
Copy link

welcome bot commented Jun 6, 2024

Thank you for opening an issue! One of our team members will get back to you with additional information.

If this is a product issue, please close this issue and contact the product's support instead. For a list of support websites, see Support for Microsoft products and apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Pri3
Projects
None yet
Development

No branches or pull requests

1 participant