更新时间:2022-05-13 02:32:53
要实现这一目标的关键属性是:
The key properties to achieve this are:
templateLink
设置要包含的模板以及要传递给被调用模板的参数的名称.
templateLink
that sets the template to be included and the names of the parameters to be passed to the called template.
"templateLink": {
"uri": "[variables('sharedTemplateUrl')]",
"contentVersion": "1.0.0.0"
}
newOrExisting
根据其值,我们可以决定使用质量检查还是产品配置.
newOrExisting
based on its value we can decide to use an QA versus Productoin config.
"newOrExisting": "new",
"configHash": {
"new": "[concat(parameters('templateBaseUrl'),'partials/QA.json')]",
"existing": "[concat(parameters('templateBaseUrl'),'partials/Production.json')]"
}
"configTemplate": "[variables('configHash')[parameters('Settings').newOrExisting]]"
You could see Azure ARM deployments: how to perform conditional deployments which has provided more details.