简体   繁体   English

arm模板部署时动态获取管理组id的值

[英]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.

相关问题 Azure 管道发布管道:ARM 模板部署:资源组 scope 失败,错误代码:部署失败” - Azure pipeline Release pipeline: ARM Template deployment: Resource Group scope fails with ,,Error code: DeploymentFailed" ARM 模板 - 从 a.network interface id 获取私有地址 ip - ARM Template - Get a private ip address from a network interface id 销毁ARM模板部署创建的资源 - Destroy resources created by ARM template deployment ARM 模板 - 参数更改未在新部署中传播 - ARM template - Change in parameter not propagating in new deployment 在同一个 arm 模板部署中创建多个密钥库机密 - Creating multiple keyvault secrets in same arm template deployment 允许云服务 ARM 模板部署到与 keyVault 不同的订阅 - Allow Cloud Service ARM template deployment to a different subscription than the keyVault ARM ADF 部署功能 - ARM ADF Deployment Features 在使用 arm 模板创建的 vmss 中使用来自不同资源组的图像 - Use image from different resource group in vmss created with arm template Azure ARM 自动化帐户变量模板 - 不能使用参数作为值 - Azure ARM template for Automation Account Variable - cant use paramets as value 如何在 Azure Enterprise Scale Landing Zone deployment ARM 模板中添加除 corp 和 online 之外的新登陆区域? - How to add new landing zones in addition to corp and online in Azure Enterprise Scale Landing Zone deployment ARM template?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM