ARMテンプレートを使用してクロスリージョナル展開を行いたいとします。ARMTemplateを使用してクロスリージョナル展開を行う方法
例1: 私は2つのリソース・グループが& B.リソースグループが一つのストレージアカウントを持っています持っています。 BのリソースグループサービスのAのストレージアカウントにアクセスしたい
例2: 私は2つのリソース・グループを持っている& B.リソースグループは、1つのアプリケーションの洞察サービスを持っています。 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