Closed Chirag1233 closed 11 months ago
@BethanyZhou please triage this. Thanks.
Hi @Chirag1233 , could you upgrade Az.Resources to latest version and paste latest debug log here? Latest version is 6.12.0 while yours is 3.1.1.
BTW, could you provide the detailed parameters used by New-AzResourceGroupDeployment? If I use New-AzResourceGroupDeployment -Name test -ResourceGroupName bez-rg -TemplateFile .\template.json
with your sample template. The error message in my side is Status Message: The location property is required for this definition. (Code:LocationRequired)
.
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
Description
Hi There, I am trying to install the ARM template and Bicep template to the Azure Stack hub using the New-AzResourceGroupDeployment. However, I have an older version mentioned in my template but when I deploy using the New-AzResourceGroupDeployment it keep coming up as invalidAPIVersion error.
Here is the sample of my ARM template:
{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", "contentVersion": "1.0.0.0", "resources": [ { "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2017-10-01", "name": "testvnet", "properties": { "addressSpace": { "addressPrefixes": [ "10.0.0.0/16" ] }, "subnets": [ { "name": "subnettest", "properties": { "addressPrefix": "10.0.0.0/24" } } ] } } ] }
and Here is my Bicep Template:
resource hubvnet 'Microsoft.Network/virtualNetworks@2017-10-01' = { name: 'testvnet' properties: { addressSpace: { addressPrefixes: [ '10.0.0.0/16' ] } subnets: [ { name: 'subnettest' properties: { addressPrefix: '10.0.0.0/24' } } ] } }
But I am keep getting this error for both of the templates: `New-AzResourceGroupDeployment : 11:48:49 PM - Error: Code=InvalidApiVersionParameter; Message=The api-version '2020-10-01' is invalid. The supported versions are '2020-0 6-01,2020-05-01,2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01 ,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,201 5-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04,2015-11-01,2015-11-01'. At line:1 char:1
New-AzResourceGroupDeployment : The deployment validation failed At line:1 char:1
Script or Debug output
Environment data
Module versions
Error output