PowerShell / DSC

This repo is for the DSC v3 project
MIT License
142 stars 22 forks source link

FilterGroup #289

Open SteveL-MSFT opened 7 months ago

SteveL-MSFT commented 7 months ago

Summary of the new feature / enhancement

It may be useful to have a FilterGroup (perhaps implemented in dsc) that will conditionally apply it's sub-configuration depending on the filter rules.

In this case, the FilterGroup resource would have a filter property which can just point to another resource that acts as a filter (via test). In this case, it could use registry resource, wmi, etc... to test for applicability.

Proposed technical implementation details (optional)

No response

SteveL-MSFT commented 7 months ago

Thinking about this, this group is essentially the AssertionGroup except that on a test operation failure, it doesn't report the configuration as failed, but something else like skipped. So perhaps we need to have a well defined result to indicate skip configuration so dsc can report that configuration was skipped but not failed and the structure of this group would be the same as AssertionGroup.