Skip to main content

InvalidTemplateCircularDependency: The template has a dependency cycle

Azure found a dependency cycle. The resources in the cycle can't be ordered so that each starts after everything it depends on.

What to check​

  1. Start with the resource in the error and follow its dependencies until you reach the same resource again. Check both dependsOn and references that create dependencies implicitly.
  2. Remove unnecessary dependencies. If both resources genuinely need values from each other, move the configuration that requires both into a later operation where the resource type supports it.

Official reference​

Microsoft Learn: Invalid template errors