gpt4 book ai didi

azure - 在 ARM 模板中添加私有(private) nuget feed 的身份验证

转载 作者:行者123 更新时间:2023-12-02 07:06:32 24 4
gpt4 key购买 nike

导入/应用站点扩展 nuget 包的 ARM 模板要求很明确,但需要公共(public)源。对于需要身份验证的私有(private) Azure DevOps 工件 nuget feed 应使用什么方法?

下面的模板代码段适用于公共(public) Feed,但在私有(private)时返回无效的 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": {}
}

]
}

最佳答案

目前无法在模板部署中使用专用端点。

关于azure - 在 ARM 模板中添加私有(private) nuget feed 的身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54948314/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com