[英]Dynamically get the value of management group id during arm template deployment
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.我想确认在 arm 模板部署范围为 MG 级别期间,无法动态获取管理组 ID 的值。
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.我的意思是类似于 ARM 模板 function subscription()返回一个 object 和一个可以在模板中使用的Id属性。
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.我知道没有managementGroup() function,但我想知道是否还有其他技巧可以避免向模板添加参数。
这在今天是不可能的,但它在积压中......如果你想分享你的用例,我也会添加它以帮助确定优先级。
There is no function like subscription()
to get the management Id directly.没有像subscription()
这样的函数可以直接获取管理 ID。 But you can use the function tenantResourceId()
to get the management group Id like this:但是您可以使用tenantResourceId()
函数来获取管理组ID,如下所示:
tenantResourceId('Microsoft.Management/managementGroups', 'groupName')
To fetch a azurepolicy id that was existing at management group level获取存在于管理组级别的 azurepolicy id
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.