Jam*_*ock 8 azure azure-web-sites azure-resource-manager azure-web-app-service
我知道如何仅在Azure门户中手动设置Https.导航到我的Web应用程序>自定义域在Azure的门户开放自定义域窗格中,其中有一个"仅HTTPS"选项.将此选项设置为"On"可启用我要查找的功能.我在Benjamin Perkins博客上找到了如何手动执行此操作.遗憾的是,它不包含如何使用ARM模板以自动方式解决问题的说明.
如何在我的ARM模板中设置此"仅Https"标志,以便我可以在部署中自动执行此设置?假设我已经有一个有效的ARM部署,只需要知道为此设置专门添加到模板的位置和内容.
我想保留基于ARM模板的方法的答案.
谢谢你的时间!
Shu*_*bao 19
对的,这是可能的.你可以查看这个链接.httpsOnly是属性中的值.例如:
{
"apiVersion": "2015-08-01",
"name": "[parameters('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource",
"displayName": "Website"
},
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
],
"properties": {
"name": "[parameters('webSiteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]",
"httpsOnly": true
}
}
Run Code Online (Sandbox Code Playgroud)
PS.模板引用可能包含错误,使用api引用(它不完美,但更好).
| 归档时间: |
|
| 查看次数: |
2612 次 |
| 最近记录: |