如何为模板引用外部对象

时间:2018-02-20 02:17:50

标签: azure-resource-manager

我的ARM模板需要在Azure自动化帐户中创建DSC节点配置,该配置不是模板的一部分,并且存在于外部资源组中。如何正确引用import { Component, OnInit, EventEmitter, Output } from '@angular/core'; import {GlobalService} from '../services/global.service'; export class HomeComponent implements OnInit { constructor(private loginservice: LoginService, private globalService: GlobalService) {} ngOnInit() {this.loginservice.userDetails(this.globalService.user_token) .subscribe((response: any) => { console.log(response); }} 模板的自动帐户?

https://docs.microsoft.com/en-us/azure/templates/microsoft.automation/automationaccounts/configurations

我的内容示例如下

Microsoft.Automation/automationAccounts/configurations

1 个答案:

答案 0 :(得分:0)

使用参考函数:

reference(resourceId('resourcegroupName', 'Microsoft.Automation/automationAccounts/configurations', 'automationAccountName', 'configurationName'), 'api-version')

参考:https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#reference

相关问题