尝试将证书添加到功能应用时,获取httpresponsemessage
我正在通过ARM模板部署功能应用程序。我添加了以下片段,以添加Azure键Vault的证书,并添加了一个主机名绑定。
{
"type": "Microsoft.Web/certificates",
"apiVersion": "2019-08-01",
"name": "[parameters('certificateName')]",
"location": "North Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('functionAppName'))]"
],
"properties": {
"keyVaultId": "[resourceId(parameters('keyvaultRG'), 'Microsoft.KeyVault/vaults', parameters('keyvaultName'))]",
"keyVaultSecretName": "[parameters('existingKeyVaultSecretName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverFarms', parameters('hostingPlanName'))]"
}
},
{
"type": "Microsoft.Web/sites/hostnameBindings",
"name": "[concat(parameters('functionAppName'), '/', parameters('customDomainName'))]",
"apiVersion": "2019-08-01",
"location": "North Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/certificates', parameters('certificateName'))]"
],
"properties": {
"sslState": "SniEnabled",
"thumbprint": "[reference(resourceId('Microsoft.Web/certificates', parameters('certificateName'))).Thumbprint]"
}
}
但是当我不部署ARM模板时,我会在Microsoft.web/证书上遇到以下错误 “消息”:“参数httpresponsemessage具有无效的值。”
I am deploying a function app via ARM template. I have added the following snippet to add the certificate from the Azure Key vault and the added a host name binding.
{
"type": "Microsoft.Web/certificates",
"apiVersion": "2019-08-01",
"name": "[parameters('certificateName')]",
"location": "North Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('functionAppName'))]"
],
"properties": {
"keyVaultId": "[resourceId(parameters('keyvaultRG'), 'Microsoft.KeyVault/vaults', parameters('keyvaultName'))]",
"keyVaultSecretName": "[parameters('existingKeyVaultSecretName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverFarms', parameters('hostingPlanName'))]"
}
},
{
"type": "Microsoft.Web/sites/hostnameBindings",
"name": "[concat(parameters('functionAppName'), '/', parameters('customDomainName'))]",
"apiVersion": "2019-08-01",
"location": "North Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/certificates', parameters('certificateName'))]"
],
"properties": {
"sslState": "SniEnabled",
"thumbprint": "[reference(resourceId('Microsoft.Web/certificates', parameters('certificateName'))).Thumbprint]"
}
}
But when I don deploy the ARM template I get the following error at Microsoft.Web/certificates
"message": "The parameter httpResponseMessage has an invalid value."
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请检查以下步骤是否有助于解决该问题:
请按以下步骤解决此问题:
Microsoft.web
资源提供商,使用Azure PowerShell指导Azure键值访问Azure键值。检查Azure密钥库的访问策略:Azure键Vault>访问政策>添加新(
microsft.web
)您的函数 - app
azure powerShell命令将证书插入keyVault:
下一步是使用
keyVaultSecretName
直接访问键车以获取值。网站。参数
:Please check if the below steps help to fix the issue:
Follow the below steps to fix this issue:
Microsoft.Web
resource provider to direct access the Azure Key Vault using the Azure PowerShell.Check the Access Policies of Azure Key Vault: Azure Key Vault > Access Policies > Add New (
Microsft.Web
)Your-Function-App
Azure PowerShell Commands for inserting the certificate to the KeyVault:
Next step is using the
KeyVaultSecretName
for directly accessing the KeyVault in order to get the value.WebSite.parameters
: