PowerShell / DSC

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

Allow resources to return metadata #467

Open tgauth opened 2 weeks ago

tgauth commented 2 weeks ago

Summary of the new feature / enhancement

Permit resources to return metadata like _messages to provide human-readable context for WhatIf executions

Proposed technical implementation details (optional)

Sample output:

results:
- metadata:
    Microsoft.DSC:
      duration:
      _messages: key HKCU\1\2\3 with name Hello and data World does not exist; would create keys 1, 2, and 3
- name: foo
  type: Microsoft.Windows/Registry
  result:
    beforeState:
      keyPath: HKCU\1\2\3
      _exist: false
    afterState:
      keyPath: HKCU\1\2\3
      valueName: hello
      valueData: world