In this blog we will learn the how the deployment occurs and how to use the resource dependencies.
Why Resource Dependencies
When deploying resources, you may need to make sure some resources are deployed before other resources and to achieve that we can configure such that one resource as dependent on the other resource.
Azure Resource Manager evaluates the dependencies between resources, and deploys them in their dependent order. When resources aren't dependent on each other, Resource Manager deploys them in parallel.
Types of Dependency
The order of resource deployment is determined in two ways:
This is created automatically when when one resource declaration references another resource in the same deployment.
An explicit dependency is declared with the dependsOn property. The property accepts an array of resource identifiers, so you can specify more than one dependency.
Visual Studio Code provides a tool for visualizing the dependencies. Open a Bicep file in Visual Studio Code, and select the visualizer button on the upper left corner.