I am using ARM Templates to deploy cloud service. Once deploy to staging slot I activate it which triggers the VIP swap.
When I want to rollback and switch staging and production stage we I again the part that activate the staging.
Problem is that it requires me to know what is the deployment label in the staging slot.
"resources" : [{
"apiVersion" : "2014-06-01",
"type" : "Microsoft.ClassicCompute/domainNames",
"name" : "[parameters('serviceDomainName')]",
"location" : "[variables('resourceLocation')]",
"resources" : [{
"apiVersion" : "2015-12-01",
"name" : "[parameters('deploymentLabel')]",
"type" : "active",
"dependsOn" : [
"[resourceId('Microsoft.ClassicCompute/domainNames', parameters('serviceDomainName'))]",
],
"properties" : {}
}
]
}
]
Is there a way to force a swap without knowing the deployment label?
Documenation talks about using: https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ClassicCompute/domainNames/{domainName}/swap
But I could not make it work in the template, since all actions are always type/name
and here I have only type.