我在 Azure 资源模板中有几个插槽,我试图弄清楚如何从参数 ( slot_for_deploy
) 中指定部署插槽,但我还没有找到解决方案。
当前模板:
{
"parameters": {
"slots_dev_name": {
"defaultValue": "dev",
},
"slot_for_deploy": {
"defaultValue": "dev",
},
},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"kind": "app",
"name": "[parameters('serverfarms_azm_name')]",
"apiVersion": "2016-09-01",
},
{
"type": "Microsoft.Web/sites",
"kind": "app",
"name": "[parameters('sites_azm_name')]",
"resources": [
{
"type": "Microsoft.Web/sites/slots",
"kind": "app",
"name": "[concat(parameters('sites_azm_name'), '/', parameters('slots_dev_name'))]",
},
{
"name": "MSDeploy",
"type": "extensions",
"properties": {
"packageUri": "...",
"setParameters": {
"IIS Web Application Name": "[parameters('sites_azm_name')]"
}
}
}
]
}
]
}