我想在两个不同的环境中创建相同的命名插槽。不同之处在于Integration
我想启用自动交换。我尝试使用condition
如下方式执行此操作,但这没有通过验证,因为我有两个同名的资源。
"resources": [
{
"condition": "[equals(parameters('env'), 'Integration')]",
"apiVersion": "2018-11-01",
"name": "staging", <----------------- HERE
"type": "slots",
"location": "[resourceGroup().location]",
"identity": {
"type": "SystemAssigned"
},
"dependsOn": [
"[variables('webApiWebSiteName')]"
],
"properties": {
"siteConfig": {
"autoSwapSlotName": "production" <----------------- only difference
}
}
},
{
"condition": "[equals(parameters('env'), 'Production')]",
"apiVersion": "2018-11-01",
"name": "staging", <----------------- HERE
"type": "slots",
"location": "[resourceGroup().location]",
"identity": {
"type": "SystemAssigned"
},
"dependsOn": [
"[variables('webApiWebSiteName')]"
],
"properties": {
}
}
]