How to use an Environment variable in an Azure Resource Management Template

半世苍凉 提交于 2019-12-06 15:55:00

Yes, for a WebApp you can do that, here's the snippet of a full WebApp resource, replace values and names with something you need:

{
    "apiVersion": "2015-08-01",
    "name": "[parameters('siteName')]",
    "type": "Microsoft.Web/sites",
    "location": "[parameters('location')]",
    "properties": {
        "serverFarmId": "[parameters('hostingPlanName')]",
        "siteConfig": {
            "appSettings": [
                {
                    "name": "storageKey", # REPLACE ME
                    "value": "[listKeys(variables('storageid'),'2015-06-15').key1]" # REPLACE ME
                },
                {
                    "name": "storageAccount", # REPLACE ME
                    "value": "[parameters('storageAccountName')]" # REPLACE ME
                }
            ]
        }
    }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!