Define a base DSC Resource interface #81
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
-
While this functionality is at least partially covered by the
DscResource
attribute, that attribute is widely used for prior versions of DSC and is (at least conceptually) non-idiomatic for implementing a class; given that classes can (and are documented as being able to) specifying interfaces and that any new interface definition would not break older implementations, I think this might be a step forward which also makes the documentation of a DSC Resource's required implementation more clear/discoverable.Further, other interfaces could be built from this one, extending the expected implementation surface of a DSC Resource to match known-good patterns (which we could also leverage).
Proposal
I propose the creation of an IDscResource interface that defines a basic DSC Resource's surface.
At a minimum, this interface should require:
To expand on the idea of inherited interfaces, an IGuestConfigDscResource interface might inherit from IDscResource and also require the Reasons property.
Beta Was this translation helpful? Give feedback.
All reactions