0
votes

I have created a main template that deploys to a resource group (parent-rg). Inside the main template, there are multiple nested templates within it. The nested templates have the option to create their resources in a different resource group (child-rg).

Naturally, during deploying, if the child-rg does not exist, the nested template will fail.

Is there a way to put a logical expression to say "if your child-rg does not exist, place it in the main template's parent-rg."

1

1 Answers

1
votes

No, you need to implement this logic outside the template and pass the "result" (yes\no, true\false, etc) to the template and in the template you can depend on this value to make a decision. arm template cannot check existence of resources.