Conversation
|
Hi @SteveL-MSFT. I tried implementing the what-if on the PS adapter, but it seems the Azure artifacts are unauthorized. Could you mind taking a look, please? |
2ec2255 to
3b715ab
Compare
SteveL-MSFT
left a comment
There was a problem hiding this comment.
I have a fundamental concern about this although I appreciate the effort. In PowerShell, scripts/cmdlets can use ShouldProcess as a way to get -whatif support. In this PR, you're modeling whatIf the same way we support it for native DSC resources. This ties into the conversation we had this morning about whether we should tell PS resource authors to have a class only for schema and implement functions instead where ShouldProcess would work. Although I suppose we COULD still support allowing a whatIf method on a class, but I would rather not create something no one will use.
| "get": { | ||
| "$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", | ||
| "type": "Microsoft.DSC/PowerShell", | ||
| "version": "0.1.0", |
There was a problem hiding this comment.
Since we shipped, we should probably update this to 1.0.0 and increment as we make changes going forward, same for win-ps adapter
There was a problem hiding this comment.
Understood. I haven't tried using the ShouldProcess. I wasn't sure if that could be captured into a variable and returned to the DSC engine.
c1824b9 to
95492ce
Compare
|
Related issue for defining method signatures to support for DSC: |
|
The WG is deferring closing on this in regards on how to expose WhatIf to PS class based resources until after we close on the model design for new resource devkit for DSCv3 PS based resources. |
PR Summary
This PR addresses #446 by adding WhatIf capability in the PowerShell adapter
PR Context