locked
The template parameter 'subscriptionId' is not valid. RRS feed

  • Question

  • I am trying to use AzureResourceManager module in Powershell to create a new Web App in a new ResourceGroup.  I've followed the documentation found here and every time I execute the New-AzureResourceGroup cmdlet, I get the following error message and it fails:

    New-AzureResourceGroup : Error 1: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template
    parameter 'subscriptionId' is not valid.'.
    At line:1 char:1
    + New-AzureResourceGroup -Name sample-group -Location "East Us" -GalleryTemplateId ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [New-AzureResourceGroup], ArgumentException
        + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupCommand

    The interesting thing is that it does create the resource group, but not the web app.  I'm using a template from the Gallery and it is complaining about a parameter "subscriptionId" that isn't even defined as a parameter in the template.  Below is the actual cmdlet I'm issuing, any help would be greatly appreciated:

    New-AzureResourceGroup -Name sample-group -Location "East Us" -GalleryTemplateIdentity Microsoft.ASPNETEmptySite.0.3.4-preview -siteName sample-rg-webapp -sku Standard -hostingPlanName sample-standard-plan -siteLocation "East US" -serverFarmResourceGroup sample-group
    

    Wednesday, April 22, 2015 6:27 PM

Answers

  • Hi Nick,

    Looks like a clear case of a broken template from the gallery. It references parameters('subscriptionId'), but that's not one of the params that it takes in!

    So nothing you're doing wrong. I'll report it to the template owners.

    David

    Wednesday, April 22, 2015 6:40 PM
  • To work around for now, please try using version 0.3.3 instead of 0.3.4 of the template.
    Wednesday, April 22, 2015 7:12 PM

All replies

  • Hi Nick,

    Looks like a clear case of a broken template from the gallery. It references parameters('subscriptionId'), but that's not one of the params that it takes in!

    So nothing you're doing wrong. I'll report it to the template owners.

    David

    Wednesday, April 22, 2015 6:40 PM
  • To work around for now, please try using version 0.3.3 instead of 0.3.4 of the template.
    Wednesday, April 22, 2015 7:12 PM
  • Will do, I also got the same error with Microsoft.Website.0.3.10-preview which is really the one I wanted to use.
    Wednesday, April 22, 2015 7:32 PM
  • Hello Nick Cipollina,

    We are still working on getting the templates fixed and will update you on the thread once they are fixed.
    However, as suggested by David Ebbo, you can choose to use the previous versions of the Templates for now. You can do the same for the template: Microsoft.Website.0.3.10-preview (use previous version)

    Thanks,
    Syed Irfan Hussain

    Friday, April 24, 2015 1:55 PM