在部署带有嵌套模板的ARM模板时,可以使用以下代码示例来正确填充_artifactLocation参数:
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2021-04-01",
"name": "nestedTemplateDeployment",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('artifactLocation'), '/nestedTemplate.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"_artifactLocation": {
"value": "[variables('artifactLocation')]"
}
}
}
}
]
在上述示例中,我们假设_artifactLocation参数的值是存储在变量variables('artifactLocation')中的URL。首先,我们使用concat函数将_artifactLocation参数与嵌套模板的相对路径连接起来,以构建完整的URL。然后,我们将该URL作为templateLink.uri的值传递给嵌套模板的部署。
同时,我们还将_artifactLocation参数作为参数传递给嵌套模板,以便在嵌套模板中使用该参数。
请确保将以上代码示例与您的ARM模板中的其他部分进行适当的集成和调整。
上一篇:arm嵌入式web服务器
下一篇:ARM期望的“汇编语言()”。