none
Azure Resource Manager template deployment failing with 'The request api-version '2015-06-15' is invalid.'

    Question

  • This just started happening. With something like the following template:

        {
          "name": "[variables('storageAccountName')]",
          "type": "Microsoft.Storage/storageAccounts",
          "location": "[resourceGroup().location]",
          "apiVersion": "2015-05-01-preview",
          "dependsOn": [ ],
          "tags": {
            "displayName": "StorageAccount"
          },
          "properties": {
            "accountType": "[parameters('storageAccountType')]"
          }
        },

    We are getting the following:

    VERBOSE: 8:38:11 PM - Resource Microsoft.Storage/storageAccounts 'csdt30simiostg' provisioning status is succeeded

    New-AzureResourceGroup : 8:38:13 PM - Resource Microsoft.Storage/storageAccounts 'csdt30simiostg' failed with message

    'The request api-version '2015-06-15' is invalid.'

    Even though the template is using 2015-05-01-preview. This just started happening. Is it a backend change?


    Tuesday, September 1, 2015 12:53 AM

Answers

  • Note to future GoogleBing-ers. After looking into it some more my actual issue was using the example here: https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-functions/ for listKeys, which has something like:

    "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0])]"

    However I'm guessing at some point (like as I am typing this), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0] started returning 2015-06-15, which isn't supported for listkeys... or something...

    Anyway, solution was to remove that section and just hard code it to some supported api version (like '2015-05-01-preview')

    • Marked as answer by Cory Crooks Monday, September 14, 2015 6:08 PM
    Monday, September 14, 2015 6:08 PM

All replies

  • I'm a little confused.

    On your JSON file, the used API is 2015-05-01-preview. But the error is related to 2015-06-15.

    You need to look where this mistype is located on your JSON file.


    Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com

    Tuesday, September 1, 2015 8:37 AM
  • Yep, that was exactly what I was reporting. Nowhere in the template did I used 2015-06-15, but it was complaining about it. Plus, it indicated it "succeeded", but then the very next statement was that it "failed" with that API. Very confusing.

    In any case, I just tried it again this morning and apparently whatever was happening on the backend has been resolved, because it is not happening now.

    • Marked as answer by Cory Crooks Tuesday, September 1, 2015 12:12 PM
    • Unmarked as answer by Cory Crooks Monday, September 14, 2015 6:08 PM
    Tuesday, September 1, 2015 12:12 PM
  • Note to future GoogleBing-ers. After looking into it some more my actual issue was using the example here: https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-functions/ for listKeys, which has something like:

    "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0])]"

    However I'm guessing at some point (like as I am typing this), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0] started returning 2015-06-15, which isn't supported for listkeys... or something...

    Anyway, solution was to remove that section and just hard code it to some supported api version (like '2015-05-01-preview')

    • Marked as answer by Cory Crooks Monday, September 14, 2015 6:08 PM
    Monday, September 14, 2015 6:08 PM
  • Changing the above command from '.apiVersions[0]' to '.apiVersions[1]' worked for me.
    Wednesday, September 16, 2015 7:09 PM