Support array for Microsoft.Windows/Registry resource#1503
Open
Gijsreyn wants to merge 2 commits intoPowerShell:mainfrom
Open
Support array for Microsoft.Windows/Registry resource#1503Gijsreyn wants to merge 2 commits intoPowerShell:mainfrom
Microsoft.Windows/Registry resource#1503Gijsreyn wants to merge 2 commits intoPowerShell:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Microsoft.Windows/Registry resource’s config input schema to support a registryKeys array wrapper (similar to the Microsoft.Windows/UpdateList pattern), enabling a single invocation to manage multiple registry keys/values while still supporting the existing single-item input shape.
Changes:
- Introduced
RegistryKey/RegistryListtypes and an untaggedRegistryinput enum to support both single and wrapper shapes. - Updated the Registry resource CLI (
registry config get|set|delete) to parse and process multiple items. - Added Pester coverage for multi-item get/set/delete/what-if flows, and updated dependent code (sshdconfig) for renamed types.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/sshdconfig/src/get.rs | Updates registry helper output type usage from Registry to RegistryKey. |
| resources/registry/src/main.rs | Adds wrapper parsing/emission and loops operations over multiple registry items. |
| lib/dsc-lib-registry/src/lib.rs | Refactors helper to operate on RegistryKey and adds new_from_key. |
| lib/dsc-lib-registry/src/config.rs | Introduces RegistryKey, RegistryList, and untagged Registry to support both input shapes. |
| resources/registry/tests/registry.config.whatif.tests.ps1 | Adds what-if coverage for multi-item wrapper input. |
| resources/registry/tests/registry.config.set.tests.ps1 | Adds set/delete coverage for multi-item wrapper input and cleanup. |
| resources/registry/tests/registry.config.get.tests.ps1 | Adds get coverage for multi-item wrapper input and missing-item behavior. |
581972e to
2b60db0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
The
Microsoft.Windows/Registryresource now accepts a registryKeys array wrapper (mirroring theMicrosoft.Windows/UpdateList pattern), so a single invocation can manage multiple registry entries.Shouldn't be a breaking change as both input shapes are supported
PR Context