gpt4 book ai didi

azure - ARM 模板将多个证书指纹分配给 WEBSITES_LOAD_CERTIFICATES

转载 作者:行者123 更新时间:2023-12-02 06:20:10 28 4
gpt4 key购买 nike

正在使用 ARM 模板将应用程序部署到 Azure 应用服务,并希望在应用服务的应用设置中的 WEBSITES_LOAD_CERTIFICATES 中加载两个证书的指纹。

{
"apiVersion": "2015-04-01",
"name": "[parameters('webAppName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Web/serverFarms/',variables('appServicePlanName'))]",
"[concat('Microsoft.Web/certificates/',variables('certificateName'))]"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverFarms',variables('appServicePlanName'))]",
"siteConfig": {
"appSettings": [
{
"name": "WEBSITE_LOAD_CERTIFICATES",
"value": "[reference(resourceId('Microsoft.Web/certificates', variables('certificateName'))).Thumbprint]"
}
]
}
}

我已尝试如下,但出现错误。我没有找到任何帮助来加载两个证书指纹。

"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverFarms',variables('appServicePlanName'))]",
"siteConfig": {
"appSettings": [
{
"name": "WEBSITE_LOAD_CERTIFICATES",
"value": "[reference(resourceId('Microsoft.Web/certificates', variables('certificateName'))).Thumbprint],[reference(resourceId('Microsoft.Web/certificates', variables('certificateName1'))).Thumbprint]"
},
]
}
},

请帮助使用 ARM 模板将两个证书指纹加载到 WEBSITES_LOAD_CERTIFICATES尝试如下,但仅加载第二个证书指纹。

"appSettings": [
{
"name": "WEBSITE_LOAD_CERTIFICATES",
"value": "[reference(resourceId('Microsoft.Web/certificates', variables('certificateName'))).Thumbprint]",
"value": "[reference(resourceId('Microsoft.Web/certificates', variables('certificateName1'))).Thumbprint]"
},

最佳答案

我们可以使用concat()组合多个字符串值的函数。请尝试使用以下代码。

"value":"[concat(reference(resourceId('Microsoft.Web/certificates', variables('certificateName'))).Thumbprint,',',reference(resourceId('Microsoft.Web/certificates', variables('certificateName1'))).Thumbprint)]"

关于azure - ARM 模板将多个证书指纹分配给 WEBSITES_LOAD_CERTIFICATES,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50596784/

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