【发布时间】:2019-12-26 12:24:40
【问题描述】:
需要添加什么应用设置属性,以便使用 ARM 模板生成新的主机密钥
"appSettings": [
{
"name": "AzureWebJobsDashboard",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]"
},
{
"name": "AzureWebJobsStorage",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]"
},
{
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]"
},
{
"name": "WEBSITE_CONTENTSHARE",
"value": "[toLower(variables('functionAppName'))]"
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~1"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "6.5.0"
},
{
"name": "ConfigurationStorageAccount",
"value": "[variables('storageAccountName')]"
},
{
"name": "ConfigurationStorageAccountKey",
"value": "[listKeys(variables('storageAccountid'),'2015-05-01-preview').key2]"
}
]
【问题讨论】:
-
我不认为你可以使用 arm 模板旋转键?
-
Akshay 无法从模板中执行此操作。但是我猜模板是通过powershell部署的?它可能来自powershell。如果您需要答案,我可以提供帮助
-
@HariHaran 是的,模板是通过 Powershell 部署的。能否请您告诉我如何使用 PowerShell 进行操作?
标签: arm-template azure-automation