Description
Summary of the new feature / enhancement
As an infrastructure engineer, I want to be able to invoke a resource's set operation with the
--what-if
flag to see how the resource would change the system, so that I can use one-off resource invocations more reliably for interactive and exploratory operations.
As a resource developer, I want to test the behavior of my resource in what-if mode for DSC with minimal overhead and unrelated operations, so that I can progressively enhance my test suite quickly and cleanly.
Right now, invoking resources in what-if mode requires creating a configuration document. While having what-if mode is more valuable for configuration documents, it's also useful for singular resource invocations like:
$properties | dsc resource set -r myOrg/myResource --what-if
This would be useful both for interactive/script users and for resource authors, who can then test the what-if messaging and behavior for their resources with less overhead and a simpler output data model.
Proposed technical implementation details (optional)
I propose that we add the w
/--what-if
flag to the dsc resource set
command, reusing (as much as possible) the logic and code for invoking resources in what-if mode used by the dsc config set
command.