Add an ensurable DSC Resource interface with default implementation #85
michaeltlombardi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Ensurable resources are an extremely common pattern; any resource which can be added/set/removed should follow this pattern which is (at least somewhat) distinct from the requirements for a DSC Resource generally.
Examples
This is a short, non-exhaustive list of DSC Resources which are ensurable:
Proposal
Following on the proposals in #81 and #82, I propose the creation of an IEnsurableDscResource interface.
At a minimum, this interface should require:
With default implementations, IEnsurableDscResource could:
Present
if any keys in the input are not null or empty, elseAbsent
$true
if the value for theEnsure
key in the input is equal to the value of the Ensure property on the class instance.$CurrentState
before returning it$false
if any check fails and$true
if they all pass.Beta Was this translation helpful? Give feedback.
All reactions