gpt4 book ai didi

Azure 资源模板 : language expression is not supported

转载 作者:行者123 更新时间:2023-12-03 03:15:51 25 4
gpt4 key购买 nike

我正在创建 Azure 资源模板,但在指定标签时收到此验证错误:

New-AzureResourceGroupDeployment : Error 1: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template resource 'hosting-plan' at line '86' and column '10' is not valid: Template language expression '[parameters('intranetConnectivity')]' is not supported..'.

以下是模板的相关部分:

"parameters": {
"intranetConnectivity": {
"type": "bool",
"defaultValue": false
},
...
}

"name": "[parameters('siteName')]",
"type": "Microsoft.Web/sites",
"location": "[parameters('siteLocation')]",
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource",
"ServiceModel": "[parameters('serviceModel')]",
"IntranetConnectivity": "[parameters('intranetConnectivity')]",
"Environment": "[parameters('environment')]"
},

我认为参数名称可能太长,但无论参数名称如何,我都会得到相同的错误。

最佳答案

事实证明,它不喜欢我在字符串值中使用 bool 参数。我将参数定义更改为字符串,一切正常。

"intranetConnectivity": {
"type": "string",
"allowedValues": [
"true",
"false"
],
"defaultValue": "false"
},

关于Azure 资源模板 : language expression is not supported,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27027228/

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