2
votes

I'm publishing an Azure Resource Manager template using the AzureRm Powershell commandlets, and everything seems to be working pretty well. Except when it's provisioning a resource of type "Microsoft.Storage/storageAccounts" it is taking over 10 minutes to complete. Is this in line with expectations? I don't recall it taking this long previously.

I'm deploying to East US, with Standard_LRS storage type.

    {
      "name": "[parameters('storageName')]",
      "type": "Microsoft.Storage/storageAccounts",
      "location": "[parameters('deployLocation')]",
      "apiVersion": "2015-06-15",
      "dependsOn": [ ],
      "tags": {
        "displayName": "[parameters('storageName')]"
       },
       "properties": {
         "accountType": "[parameters('storageType')]"
       }
     }
1

1 Answers

1
votes

It is an interesting question, and I will probably spend a little time getting metrics later!

However, I suspect you are correct but there are reasons that that would be the case.

When you create a Storage Account in Powershell, whether Service or Resource Management, you submit a job to create an account and that is all that needs occur.

When you deploy a template, there are a number of steps that need to be completed. Such as

  • Template Validation
  • Job ordering / Resolving dependencies (even if there is only a single step, this would be part of the pipeline)
  • Comparison with existing infrastructure (because templates are idempotent there needs to be a check of what currently exists)
  • creating a deployment job
  • the actual deployment

Each step in the pipeline is (very likely) performed through a queue, so even a few seconds for each step to dequeue will add up.

If you enable verbose / debug logging, you will see a lot of this going on (especially with larger templates)