Home > database >  Microsoft Azure: 'New-AzResourceGroupDeployment : A parameter cannot be found that matches para
Microsoft Azure: 'New-AzResourceGroupDeployment : A parameter cannot be found that matches para

Time:08-02

I'm a beginner at Microsoft Azure so please bear with me. I'm following this tutorial on deploying bicep templates with parameters, my bicep file is the exact same as the one in the tutorial. However, when I attempt to deploy it I get the following error

New-AzResourceGroupDeployment : A parameter cannot be found that matches parameter name 'location'.

The location parameter definitely exists. I'm deploying with the following command:

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

Any help would be appreciated!

CodePudding user response:

It looks like the tutorial contains an error. In the official documentation, there is no location parameter in the New-AzResourceGroupDeployment cmdlet.

Also, you have already specified a resource group, and the resources you describe with bicep contain a location. So the location parameter makes no sense here - just leave it out!

Note that you can also deploy your bicep files using the Azure CLI. See Deploy local Bicep file

  • Related