Azure / Azure/deployment-stacks
Parallelize denyAssignment operations in Azure Deployment Stacks to reduce deployment time
- Dominant language
- Bicep
- Stars
- 101
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
# Is your feature request related to a problem? Please describe.
When deploying Azure Deployment Stacks with a large number of resources, the time it takes to set denyAssignments is significant and adds considerable overhead to the overall deployment duration. Currently,
denyAssignments appear to be applied sequentially, meaning the time to complete scales linearly with the number of resources in the stack. This results in unacceptably long deployment times for larger stacks.
As a workaround, we have implemented custom monitoring logic that watches for successful resource deployments and performs an early return — effectively bypassing the denyAssignment phase and trusting that Azure handles
the assignments in the background. This approach introduces fragility, complexity, and risk into our deployment pipeline.
# Describe the solution you'd like
We would like denyAssignments to be applied in parallel rather than sequentially during Azure Deployment Stack operations. This would reduce the time required to set denyAssignments proportional to the number of
resources and significantly improve deployment performance at scale.
# Describe alternatives you've considered
- Splitting stacks into smaller inner deployments: We have decomposed large modules (e.g., network connectivity) into separate stacks — for example, deploying Private DNS Zones and Private DNS Zone Links in isolated
stacks that can be deployed in parallel. While this helps, it adds architectural complexity and does not fully address the performance issue, especially for stacks that are inherently large.
- Early return workaround: As described above, we monitor deployment success and exit early before denyAssignments complete. This reduces wait time but introduces risk and technical debt.
# Additional context
This limitation particularly impacts teams managing large-scale Azure environments with many resources per stack. Parallelizing denyAssignment operations is a low-risk, high-impact improvement that would benefit any
organization using Deployment Stacks at scale without requiring changes to deployment architecture or custom workarounds.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.