Azure / Azure/azure-cli

`az deployment ...` very slow compared to times reported in portal

Open
#16,878 3 comments 1 reaction 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
When deploying ARM Templates using the `az deployment ...` series of commands the time spent by the command is much longer than the reported time deploying by the portal.

**To Reproduce**
Deploy some ARM templates using `az deployment` commands (`sub` and `group` for example) and check how long the `az` command takes to terminate vs the times shown in the portal.

**Expected behavior**
`az` should return quicker if the portal reports much lower times.

**Environment summary**
N/A

**Additional context**
Here is the time spent while deploying a Resource Group and Role Definition (which already exist):
![image](https://user-images.githubusercontent.com/2286713/107423496-4836c900-6b14-11eb-8bfb-c1511bbfc98b.png)

This is how long it takes to provision the templates using two parallel `az deployment sub` commands in an Azure Pipeline:
![image](https://user-images.githubusercontent.com/2286713/107423548-5ab10280-6b14-11eb-8c02-3e2acc09674d.png)

(The reason I now run some of the ARM commands in parallel is because they all take ~30 seconds even if there's no changes made to any infrastructure...)

Thinking further this may not be the right place to raise this (as `AzureResourceManagerTemplateDeployment@3` is also just as slow which is why I started to parallelise them using Pwsh and `az`), but I can't think of where else this should be raised and so here is a start and maybe we can at least get a discussion going or a pointer to another place to report this. Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.