ARM 模板 Azure Web App - 如何指定堆栈设置(.NET、.NET Core 等)? [英] ARM template Azure Web App - How do you specify Stack Settings (.NET, .NET Core,...)?

查看:20
本文介绍了ARM 模板 Azure Web App - 如何指定堆栈设置(.NET、.NET Core 等)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Azure Web App 的 ARM 模板中,如何指定应用程序的堆栈设置(.NET、.NET Core、PHP 等)?我看不到它的任何字段.

In ARM template for Azure Web App, how do you specify the stack settings for the app (.NET, .NET Core, PHP, ...)? I cannot see any field for it.

谢谢

推荐答案

在门户上创建 azure webapp 时,选择 Running stack 作为 .Net Core 3.0(Current).

When you create azure webapp on portal, choose Running stack as .Net Core 3.0(Current).

然后点击Review+Create > 下载自动化模板.您将看到包含 metadata 属性的 ARM 模板,当前堆栈值为 dotnetcore.

Then click Review+Create > Download a template for automation. You will see the ARM template which contain metadata attribute and the current stack value is dotnetcore.

{
    "apiVersion": "2018-02-01",
    "name": "[parameters('name')]",
    "type": "Microsoft.Web/sites",
    "location": "[parameters('location')]",
    "properties": {
        "name": "[parameters('name')]",
        "siteConfig": {
            "appSettings": [],
            "metadata": [
                {
                    "name": "CURRENT_STACK",
                    "value": "[parameters('currentStack')]"
                }
            ]
        },
        // redacted some values
    }
}

这篇关于ARM 模板 Azure Web App - 如何指定堆栈设置(.NET、.NET Core 等)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆