Skip to content

Support array for Microsoft.Windows/Registry resource#1503

Open
Gijsreyn wants to merge 2 commits intoPowerShell:mainfrom
Gijsreyn:support-array-registry
Open

Support array for Microsoft.Windows/Registry resource#1503
Gijsreyn wants to merge 2 commits intoPowerShell:mainfrom
Gijsreyn:support-array-registry

Conversation

@Gijsreyn
Copy link
Copy Markdown
Collaborator

@Gijsreyn Gijsreyn commented May 1, 2026

PR Summary

The Microsoft.Windows/Registry resource now accepts a registryKeys array wrapper (mirroring the Microsoft.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

Copilot AI review requested due to automatic review settings May 1, 2026 06:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / RegistryList types and an untagged Registry input 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.

Comment thread resources/registry/src/main.rs Outdated
Comment thread resources/registry/src/main.rs Outdated
Comment thread resources/registry/src/main.rs
@Gijsreyn Gijsreyn force-pushed the support-array-registry branch from 581972e to 2b60db0 Compare May 1, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants