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에 새 서비스를 만듭니다.
이 문제를 해결하는 방법?
는
템플릿을 어떻게 배포합니까? vsts? – 4c74356b41
오류 메시지에''api-version '2017-05-10'이상을 사용하여 템플릿을 배포하십시오 '라는 메시지가 나타납니다. 시도해 보셨습니까? –
@ 4c74356b41 - PowerShell을 사용하여 ARMTemplate을 배포하고 있습니다. – Amruta