在资源管理器模板中定义WebApp插槽

Jam*_*mes 4 deployment azure dsc azure-resource-manager

我无法使用资源管理器模板以编程方式查找有关向WebApps添加插槽的信息/指南.我的基本配置运行良好,创建了WebApp本身,SQL服务器,SQL DB等,但我也很想完成插槽,所以我可以将它们用于开发/测试版本.

有谁知道这有什么好资源?

Mic*_*mpl 5

我使用以下ARM模板为Azure App Service配置部署插槽:

{
    "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "siteName": {
            "type": "string"
        },
        "slotName": {
            "type": "string"
        }
    },
    "resources": [
        {
            "apiVersion": "2015-04-01",
            "type": "Microsoft.Web/Sites/Slots",
            "name": "[concat(parameters('siteName'), '/', parameters('slotName'))]",
            "location": "[resourceGroup().location]",
            "properties": {},
            "resources": []
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助.