Skip to main content

TemplateResourceCircularDependency: Resource dependencies form a cycle

The template's resources depend on one another in a loop. Azure can't find a valid order in which to deploy them.

What to check​

  1. Trace the dependencies from the resource identified in the error. Include dependsOn and any dependencies inferred from resource references.
  2. Remove redundant dependencies. If the cycle comes from configuration that genuinely needs both resources to exist, check whether you can apply that part later.

Official reference​

Microsoft Learn: Invalid template errors