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

Define WebApp slots in Resource Manager Template

我无法找到 information/guides 使用资源管理器模板以编程方式向 WebApps 添加槽。我的基本配置运行良好,创建了 WebApp 本身、SQL 服务器、SQL 数据库等,但我也很想完成这些插槽,以便我可以将它们用于 dev/test 建造。

有人知道这方面的好资源吗?

我在 GitHub

上找到了这些 templates

此外 - 您看过或使用过 Azure 资源管理器可视化工具吗?资源也很好 http://armviz.io/#/

我正在使用以下 ARM 模板为 Azure 应用服务配置部署槽:

{
    "$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": []
        }
    ]
}

希望对您有所帮助。