DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Proposal: Add a xplat command-based resource for use in documentation

Open michaeltlombardi opened this issue 11 months ago • 0 comments

Summary of the new feature / enhancement

As a DSCv3 user who manages environments that include non-Windows machines, I want to be able to review and use DSC Configuration Documents that can enforce state on non-Windows machines without PowerShell.

Currently, the only command-based resource available for use that isn't a tutorial example, resource group, resource provider, or PowerShell resource is the Microsoft.Windows/Registry resource. This limits the documentation and examples for DSCv3 to either:

  1. Windows-only examples
  2. PowerShell-only examples

Neither of which are representative of the intended ecosystem and usage for DSCv3. While those working environments are expected to be common and fully supported, using them as the first (or only) examples in the documentation implies that managing non-Windows machines without PowerShell isn't first-class---and that's not true.

With one or more cross-platform resources, we could define example configurations that aren't Windows-specific or that require PowerShell.

Proposed technical implementation details (optional)

Define a cross-platform command-based DSC Resource for a common configuration item. An ideal (but high-effort) candidate for this is a File resource that handles creating, updating, and deleting files.

While an Notification resource would be easier to implement and useful for showing differences in behavior, it doesn't really show how DSCv3 can enforce and validate state.

A User or Group resource would be broadly applicable by managing local users or groups, but is relatively complicated and might run into local system munging issues in a way that managing arbitrary files doesn't.

An Environment resource could be a good compromise candidate, managing an arbitrary environment variable, though there are complexities in how environment variables are implemented between Windows and non-Windows systems.

michaeltlombardi avatar Aug 14 '23 17:08 michaeltlombardi