PowerShell / DSC

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

Add resource support for what if #441

Closed tgauth closed 3 weeks ago

tgauth commented 1 month ago

PR Summary

{
    "$schema": "https://aka.ms/dsc/schemas/resource_manifest",
    // truncated
    "set": {
        "executable": "whatifexample",
        "args": [],
        "return": "state"
    },
    "whatIf": {
        "executable": "whatifexample",
        "args": [
            "--what-if"
        ],
        "return": "state"
    },
    // truncated
}

PR Context

SteveL-MSFT commented 4 weeks ago

Should there be a separate schema for what resources return for what-if that aligns with how the engine synthesizes it? Perhaps with addition of reason field that is open text that the resource can fill in

anmenaga commented 4 weeks ago

@tgauth please open an issue to add 'whatif' support to PS Adapter.

SteveL-MSFT commented 4 weeks ago

Based on the review meeting:

SteveL-MSFT commented 3 weeks ago

@tgauth can you provide example of what-if output where a resource participates?