0

ARM 템플릿을 사용하여 교차 지역 배포를 수행하고 싶습니다.ARMTemplate을 사용하여 교차 지역 배포를 얻는 방법

예 1 I는 두 리소스 그룹에서 리소스 그룹이 하나 개의 저장 계정이있는 & B.이다있다. B의 자원 그룹 서비스에서 A의 스토리지 계정에 액세스하려고합니다.

예 2 : 나는이 개 자원 그룹이 & B를 자원 그룹은 하나 개의 응용 프로그램 통찰력 서비스를했다입니다 있습니다. ApiApp "appsettings"에 Instrumentation 키가 추가 된 B의 ApiApp 서비스에서 A의 애플리케이션 통찰력에 액세스하려고합니다.

나는 ARMTemplate에 코드 아래에 추가 시도 : 배포 오류가 아래에 제공하면서

{ 
     "apiVersion": "2017-05-10", 
     "name": "nestedTemplate", 
     "type": "Microsoft.Resources/deployments", 
     "resourceGroup": "testresgrp01", 
     "properties": { 
     "mode": "Incremental", 
     "template": { 
      "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 
      "contentVersion": "1.0.0.0", 
      "parameters": {}, 
      "variables": {}, 
      "resources": [ 
      { 
       "type": "Microsoft.Insights/components", 
       "name": "[parameters('appinsightname')]", 
       "apiVersion": "2015-06-15", 
       "location": "South Central US", 
       "properties": { 

       } 
      } 
      ] 
     }, 
     "parameters": {} 
     } 
    }, 
    { 
     "type": "Microsoft.Insights/components", 
     "name": "[parameters('appinsightname')]", 
     "apiVersion": "2015-06-15", 
     "location": "South Central US", 
     "properties": { 

     } 
    } 

그러나이 부분 오류 :

New-AzureRmResourceGroupDeployment : - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The 
template resource 'nestedTemplate' at line '224' and column '10' is invalid. The api-version '2016-07-01' used to deploy the 
template does not support 'ResourceGroup' property. Please use api-version '2017-05-10' or later to deploy the template. 

내가 "resourceGroup"제거하면 "testresgrp01를" 섹션에서 자원 배포는 resourcegroup에 새 서비스를 만듭니다.

이 문제를 해결하는 방법?

+0

템플릿을 어떻게 배포합니까? vsts? – 4c74356b41

+0

오류 메시지에''api-version '2017-05-10'이상을 사용하여 템플릿을 배포하십시오 '라는 메시지가 나타납니다. 시도해 보셨습니까? –

+0

@ 4c74356b41 - PowerShell을 사용하여 ARMTemplate을 배포하고 있습니다. – Amruta

답변

0

나는 당신의 푸른 파워 쉘 모듈 구식 확신, 최근에 업데이트 한 후 다시 시도 감사드립니다.

대개 모든 모듈을 삭제하고 충돌이 발생하지 않도록 처음부터 설치하십시오.

+0

이 옵션도 시도했습니다. Azure 모듈을 제거하고 다시 설치하십시오. 그렇다면 동일한 오류가 발생합니다 .. API 버전 – Amruta

+0

정확한 템플릿 코드를 표시 – 4c74356b41

+0

안녕하세요? 코드를 보여줄 수 있습니까? @Amruta는 powershell로 배포하고 있습니까? – 4c74356b41

관련 문제