Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New-AzureRmResourceGroupDeployment command giving error

Tags:

powershell

When I run the New-AzureRmResourceGroupDeployment and pass a JSON parameter file, I get the below error:

New-AzureRmResourceGroupDeployment : 2:29:31 PM - Resource Microsoft.Sql/servers 'qsservername' failed with message '{
  "code": "15021",
  "message": "Invalid value given for parameter Login. Specify a valid parameter value.",
  "target": null,
  "details": [
    {
      "code": "15021",
      "message": "Invalid value given for parameter Login. Specify a valid parameter value.",
      "target": null,
      "severity": "16"
    }
  ],
  "innererror": []
}'
At M:\Azure\Azure Scripts\Something\somethingdeploy.psm1:63 char:4
+    New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGro ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

However, when I run the same command but pass the parameters instead of the file, it works fine. any ideas what I may be missing?

like image 530
Amy Avatar asked May 04 '17 19:05

Amy


1 Answers

For me, this error happened when I tried to run ARM templates with the existing SQL Azure instance resource. The problem was that in the template I specified a DB username which didn't match the admin username of the existing instance. It's ok to update the password, but the username has to remain the same for the life of SQL Azure instance,

like image 66
Boris Lipschitz Avatar answered Sep 22 '22 09:09

Boris Lipschitz