PSArm icon indicating copy to clipboard operation
PSArm copied to clipboard

DependsOn functionality

Open rjmholt opened this issue 5 years ago • 3 comments

It should be possible to declare multiple templates in PSArm and relate them by a depends-on relationship, so that templates can compose and be built/deployed in the correct order.

This should be available in both an explicit and implicit form, so that a template can explicitly depend on another, or have a dependency inferred automatically at build time through some other reference mechanism.

rjmholt avatar Sep 25 '20 00:09 rjmholt

@rdtechie please add any extra info here that you'd like to see in this mechanism

rjmholt avatar Sep 25 '20 00:09 rjmholt

@rjmholt The description looks good to me. I'm not sure however if you want to go down the rabbit hole of implicit dependencies, as this requires you also to built in some sort of graphing functionality. For the first iteration I would suggest to keep it simple, and make it explicit. If that makes sense?

rdtechie avatar Oct 01 '20 16:10 rdtechie

@rdtechie I think it would be simple enough to do terraform style dependson where, if you reference the property of another object, an implicit DependsOn gets inserted there, though I'm not sure if ARM engine handles if it detects a dependency loop, never tested it e.g. (B depends on A depends on B)

JustinGrote avatar Oct 01 '20 16:10 JustinGrote