Compartilhar via


Resource.DependsOn Property

Definition

Declares explicit dependencies on other resources.

public System.Collections.Generic.IList<Azure.Provisioning.Primitives.Resource> DependsOn { get; }
member this.DependsOn : System.Collections.Generic.IList<Azure.Provisioning.Primitives.Resource>
Public ReadOnly Property DependsOn As IList(Of Resource)

Property Value

Remarks

While you may be inclined to use dependsOn to map relationships between your resources, it's important to understand why you're doing it. For example, to document how resources are interconnected, dependsOn isn't the right approach. After deployment, the resource doesn't retain deployment dependencies in its properties, so there are no commands or operations that let you see dependencies. Setting unnecessary dependencies slows deployment time because Resource Manager can't deploy those resources in parallel.

Even though explicit dependencies are sometimes required, the need for them is rare. In most cases, you can use a symbolic name to imply the dependency between resources. If you find yourself setting explicit dependencies, you should consider if there's a way to remove it.

Applies to