Reputation: 213
I would like to confirm that there is no way to dynamically get the value of management group id during arm template deployment scoped to the MG level.
I mean something similar to the ARM template function subscription() which returns an object with an Id property that can be used in the template.
I know there is no managementGroup() function, but I am wondering if there is any other trick to avoid having to add a parameter to the template.
Upvotes: 0
Views: 805
Reputation: 1
To fetch a azurepolicy id that was existing at management group level
Upvotes: 0
Reputation: 31462
There is no function like subscription()
to get the management Id directly. But you can use the function tenantResourceId()
to get the management group Id like this:
tenantResourceId('Microsoft.Management/managementGroups', 'groupName')
Upvotes: 0
Reputation: 8737
This isn't possible today but it's on the backlog... If you want to share your use case for it I'll add that as well to help prioritize.
Upvotes: 1