在ARM模板中为私有nuget feed添加身份验证
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在ARM模板中为私有nuget feed添加身份验证相关的知识,希望对你有一定的参考价值。
导入/应用站点扩展nuget包的ARM模板要求很明确,但需要公共源。对于需要身份验证的私有Azure DevOps工件nuget源应该使用什么方法?
下面的模板片段适用于公共Feed,但在私有时返回Invalid feed Uri。
{
"name": "[variables('webAppName')]",
"type": "Microsoft.Web/sites",
"kind": "app",
"location": "[resourceGroup().location]",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appServiceName'))]"
],
"tags": {},
"properties": {
"name": "[variables('webAppName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServiceName'))]",
"siteConfig": {
"WindowsFxVersion": "[parameters('windowsFxVersion')]",
"ftpsState": "Disabled",
"phpVersion": "Off",
"use32BitWorkerProcess": false,
"http20Enabled": true,
"minTlsVersion": "1.2",
"defaultDocuments": [
"index.html"
]
},
"hostNames": [
"[concat('wa-', parameters('baseAppName'),'.azurewebsites.net')]"
],
"siteProperties": {
"metadata": null,
"properties": [{
"name": "LinuxFxVersion",
"value": null
},
{
"name": "WindowsFxVersion",
"value": "DOTNETCORE|2.2"
}
],
"appSettings": null,
"httpsOnly": true
},
"availabilityState": "Normal",
"sslCertificates": null,
"httpsOnly": true,
"csrs": [],
"cers": null,
"siteMode": null,
"enabledHostNames": [
"[concat('wa-', parameters('baseAppName'),'.azurewebsites.net')]",
"[concat('wa-', parameters('baseAppName'),'.scm.azurewebsites.net')]"
]
},
"resources": [{
"name": "appsettings",
"type": "config",
"apiVersion": "2015-08-01",
"dependsOn": [
"[concat('Microsoft.Web/sites/', variables('webAppName'))]"
],
"properties": {
"SCM_SITEEXTENSIONS_FEED_URL": "[PRIVATE NUGET FEED]"
}
},
{
"apiVersion": "2015-08-01",
"name": "[SITE EXTENSION NAME]",
"type": "siteextensions",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webAppName'))]",
"[concat(resourceId('Microsoft.Web/Sites', variables('webAppName')),'/config/appsettings')]"
],
"properties": {}
}
]
}
答案
目前,无法在模板部署中使用专用端点。
以上是关于在ARM模板中为私有nuget feed添加身份验证的主要内容,如果未能解决你的问题,请参考以下文章
在R中为三种不同的后验分布添加带有ggplot的标签[重复]
如何使用 REST API 或 ARM 模板通过私有 GitHub 存储库在应用服务中部署应用?