![](/img/trans.png)
[英]Azure Resource Manager: Web App Slots Config: App Service Authentication
[英]ARM Template: How can i ensure Web App slots do not get the Web App Settings deployed over?
我在 Azure 上為我們的暫存和生產環境提供了完整的 ARM 模板。 它通過 Azure DevOps 發布。
However, i noticed that the Web App settings i have applied in my ARM for the Web App, it replicates over to the Web App Slots also. 我知道這可以在 Azure 上手動勾選,但是有沒有辦法在 ARM 模板上做到這一點? 我查看了 Microsoft 網站,但沒有看到任何幫助,並且想知道這是否是手動任務?
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2019-08-01",
"location": "[resourceGroup().location]",
"name": "[concat(parameters('webAppName'), '/appsettings')]",
"dependsOn": [
"[parameters('webAppName')]",
"[concat(parameters('sqlDatabase'), 'constr')]"
],
"properties": {
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsights')), '2014-04-01').InstrumentationKey]",
"ApplicationInsightsAgent_EXTENSION_VERSION": "~2",
"DiagnosticServices_EXTENSION_VERSION": "~3",
}
這就是我的應用程序設置代碼的樣子(還有更多應用程序設置,我不需要全部復制)
下面是我的 Web 應用槽 ARM 代碼
{
"apiVersion": "2019-08-01",
"type": "Microsoft.Web/sites/slots",
"name": "[concat(parameters('webAppName'), '/', parameters('slots')[copyIndex()])]",
"kind": "app",
"location": "[resourceGroup().location]",
"copy": {
"name": "WebAppSlots",
"count": "[length(parameters('slots'))]"
},
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('planName'))]"
},
"dependsOn": [
"[parameters('webAppName')]",
"[concat(parameters('sqlDatabase'), 'constr')]"
]
},
我真的很感激任何關於這個問題的見解。
謝謝:)
使用 ARM 模板的插槽設置非常痛苦。 在 ARM 模板中沒有辦法在不實際復制插槽定義中的屬性部分的情況下復制設置。
由於您使用 Azure DevOps 進行部署,因此您可以使用更多選項。 在我的腦海中,這些包括:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.