gpt4 book ai didi

azure - 微软Azure : 'New-AzResourceGroupDeployment : A parameter cannot be found that matches parameter name ' location'

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

我是 Microsoft Azure 的初学者,请耐心等待。我正在关注this关于使用参数部署二头肌模板的教程,我的二头肌文件与教程中的完全相同。但是,当我尝试部署它时,出现以下错误

New-AzResourceGroupDeployment:找不到与参数名称“位置”匹配的参数。

位置参数肯定存在。我使用以下命令进行部署:

New-AzResourceGroupDeployment -ResourceGroupName ResourceGroup -TemplateFile c:\Users\Name\Desktop\files\azure\testing\test.bicep -location 区域 -storagename storageaccountname -storagetype Standard_LRS -WhatIf

如有任何帮助,我们将不胜感激!

最佳答案

教程似乎包含错误。在 official documentationNew-AzResourceGroupDeployment cmdlet 中没有 location 参数。

此外,您已经指定了一个资源组,并且您用 bicep 描述的资源包含一个位置。所以位置参数在这里没有意义 - 只需将其省略即可!

请注意,您还可以使用 Azure CLI 部署二头肌文件。请参阅Deploy local Bicep file

关于azure - 微软Azure : 'New-AzResourceGroupDeployment : A parameter cannot be found that matches parameter name ' location',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73202126/

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