According to this page in the DSC documentation, “Typically (though not necessarily always), DSC applies the resources in the order that they appear within the configuration.” The author suggests using DependsOn when order would definitely matter, as in the case of a prerequisite.
However, to make things as consistent as possible in my environment, I’d like to run in order all the time, every time. That way there is no chance of two machines being different in an unexpected way because the configuration was applied in a different order for each.
Does anyone know exactly what the circumstances are under which the resources aren’t applied in order? Maybe they are so rare and avoidable that DSC does, for my purposes, always run things in order.
If nobody knows, what are my options for getting things to run in order all the time? One would be to put a DependsOn property on every resource, referencing the previous resource.
What about the MOF? Is it guaranteed to always run in order? I suspect not, since the DependsOn parameter shows up there as well. But if I’m wrong and it is always run in order, I could tailor or at least check it to verify the ordering.