title: How do one add delay to deployment of ARM template resource?
body: <p>I deploy 2 resources which one depends on another one but it seems to be a delay between first resource becoming fully operational and second resource being implemented. Code is below. First resource being deployed is DNS resource pointing to APP service and second resource is adding custom hostname binding to App Service. Issue is that there is seems to be a delay in up to 30 seconds between app service being able to validate DNS record being available to verify record. Is it possible somehow to add small delay between resources deployments since just using <code>dependsOn</code> is not sufficient in this case</p>
  <pre class="lang-json prettyprint-override"><code>{
           &quot;apiVersion&quot;: &quot;2020-09-01&quot;,
           &quot;name&quot;: &quot;[concat(parameters('webAppName'), '-mysite','/mysite.', variables('dnsZoneName'))]&quot;,
           &quot;type&quot;: &quot;Microsoft.Web/sites/hostNameBindings&quot;,
           &quot;location&quot;: &quot;[variables('location')]&quot;,
           &quot;dependsOn&quot;: [
              &quot;[resourceId('Microsoft.Network/dnszones/CNAME', variables('dnsZoneName'), 'mysite')]&quot;
           ],
           &quot;properties&quot;: {
              &quot;domainId&quot;: null,
              &quot;siteName&quot;: &quot;[concat(parameters('webAppName'), '-mysite')]&quot;,
              &quot;customHostNameDnsRecordType&quot;: &quot;CName&quot;,
              &quot;hostNameType&quot;: &quot;Verified&quot;
           }
        },
        {
           &quot;type&quot;: &quot;Microsoft.Network/dnszones/CNAME&quot;,
           &quot;apiVersion&quot;: &quot;2018-05-01&quot;,
           &quot;dependsOn&quot;: [
              &quot;[concat(parameters('webAppName'), '-mysite')]&quot;
           ],
           &quot;name&quot;: &quot;[concat(variables('dnsZoneName'), '/mysite')]&quot;,
           &quot;properties&quot;: {
              &quot;TTL&quot;: 3600,
              &quot;CNAMERecord&quot;: {
                 &quot;cname&quot;: &quot;[reference(concat(parameters('webAppName'), '-mysite'), '2016-03-01', 'Full').properties.defaultHostName]&quot;
              },
              &quot;targetResource&quot;: {}
           }
        },
  </code></pre>