PowerShell / PowerShell/DSC

Allow configuration parameters to be passed as command-line parameters

Open
#594 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Enhancement Needs Triage
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

Summary of the new feature / enhancement

Allow parameters to dsc after -- to be interpreted as parameters to the configuration.

Proposed technical implementation details (optional)

Assume a configuration that looks like:

parameters:
  osFamily:
    type: string
    defaultValue: Windows
    allowedValues:
      - Windows
      - Linux
      - macOS
  name:
    type: string

Then we could allow config parameters to be passed as command-line parameters after --, so something like:

dsc config get -p ./foo.dsc.yaml -- --osFamily Windows --name test

One limitation to this experience is that JSON is case-sensitive, so the parameter names would have to be case-sensitive. We could allow for case-insensitive and do an exact match first and then case-insensitive match if it only matches one (it would be a bad practice to have multiple parameters that differ by case, although it would be allowed). However, parameter values are also case-sensitive, so we'd also need to perform a best match if there's an allowedValues.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing argument handling for dsc config get, then follow how configuration parameters and allowedValues are resolved. Done means arguments after -- are passed to the configuration with the documented matching and case-sensitivity behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.