I would like to create same named slots on two different environments. The difference is that on Integration
I want to have autoswap enabled. I tried doing this using condition
like below but this does not pass validation because I have two resources with same name.
"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": {
}
}
]