title: Why is 'dependsOn' not recommended in Bicep?
body: <p>Microsoft <a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/resource-dependencies#explicit-dependency" rel="nofollow noreferrer">documents</a> the purpose of implicit and explicit dependencies. Where the explicit dependency uses 'dependsOn'. But it is mentioned that use cases for this approach are rare.</p>
  <p>Could use some clarification on the following:</p>
  <p>Example from MS</p>
  <pre><code>resource dnsZone 'Microsoft.Network/dnszones@2018-05-01' = {
    name: 'demoeZone1'
    location: 'global'
  }
  
  resource otherZone 'Microsoft.Network/dnszones@2018-05-01' = {
    name: 'demoZone2'
    location: 'global'
    dependsOn: [
      dnsZone
    ]
  }
  </code></pre>
  <p>Quote</p>
  <blockquote>
  <p>You can't query which resources were defined in the dependsOn element after deployment.</p>
  </blockquote>
  <p>Assuming 'otherZone' is a dependsOn element, it can still be queried using the symbolic name.</p>
  <p>Am I wrong and if so what is meant with <code>the dependsOn element</code>?</p>