Skip to content

Commit 274d8d1

Browse files
(MAINT) Sync alpha.5 docs updates (#247)
1 parent aa250ac commit 274d8d1

File tree

22 files changed

+1358
-219
lines changed

22 files changed

+1358
-219
lines changed

dsc/docs-conceptual/dsc-3.0/changelog.md

Lines changed: 216 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Desired State Configuration changelog"
33
description: >-
44
A log of the changes for releases of DSCv3.
5-
ms.date: 01/17/2024
5+
ms.date: 03/06/2024
66
---
77

88
# Changelog
@@ -22,10 +22,179 @@ This section includes a summary of user-facing changes since the last release. F
2222
changes since the last release, see the [diff on GitHub][unreleased].
2323

2424
<!-- Unreleased comparison link -->
25-
[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-alpha.4...main
25+
[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-alpha.5...main
2626

2727
<!-- Add entries between releases under the appropriate section heading here -->
2828

29+
## [v3.0.0-alpha.5][release-v3.0.0-alpha.5] - 2024-02-27
30+
31+
This section includes a summary of changes for the `alpha.5` release. For the full list of changes
32+
in this release, see the [diff on GitHub][compare-v3.0.0-alpha.5].
33+
34+
<!-- Release links -->
35+
[release-v3.0.0-alpha.5]: https://github.com/PowerShell/DSC/releases/tag/v3.0.0-alpha.5 "Link to the DSC v3.0.0-alpha.5 release on GitHub"
36+
[compare-v3.0.0-alpha.5]: https://github.com/PowerShell/DSC/compare/v3.0.0-alpha.4...v3.0.0-alpha.5
37+
38+
### Changed
39+
40+
- Updated the options for the `dsc` root command:
41+
42+
- Removed the global `--format` option, which controls the output format. Now, the relevant
43+
subcommands that return formattable output have the `--format` option (short option as `-f`)
44+
added to them.
45+
- Removed the global `--input` and `--input-file` options. Now, the `config` subcommands have the
46+
`--document` and `--path` options for specifying the configuration document as a string or from
47+
a file. The relevant `resource` subcommands have the `--input` and `--path` options for
48+
specifying the instance properties as a string or from a file.
49+
- The `--logging-level` option is renamed to [--trace-level][36] with the short name `-l`. The
50+
default trace level is now `warning` instead of `info`.
51+
- Added the [--trace-format][37] option with the `-f` short name. This option enables you to
52+
choose the format for the trace messages emitted to stderr. By default, the messages are
53+
emitted as lines of text with console colors. You can set this option to `plaintext` to emit
54+
the messages without console colors or to `json` to emit the messages as JSON objects.
55+
56+
<details><summary>Related work items</summary>
57+
58+
- Issues:
59+
- [#286][#286]
60+
- [#227][#227]
61+
- [#226][#226]
62+
- PRs:
63+
- [#299][#299]
64+
- [#303][#303]
65+
- [#305][#305]
66+
67+
</details>
68+
69+
- Updated the JSON schemas for the [get][38], [set][39], and [test][40] output data. This change
70+
corrects an issue with how DSC surfaced information about instances nested inside group and
71+
adapter resources. Now when you review the output, you'll be able to see the results for each
72+
nested instance instead of a confusing object that loses the nested instance type and name
73+
information.
74+
75+
This schema change is backwards compatible.
76+
77+
<details><summary>Related work items</summary>
78+
79+
- Issues:
80+
- [#165][#165]
81+
- [#266][#266]
82+
- [#284][#284]
83+
- PRs: [#318][#318]
84+
85+
<details>
86+
87+
- Changed the [concat][41] configuration function to match the behavior of the ARM template
88+
function. The `concat()` function now only accepts strings or arrays of strings as input values.
89+
It raises an error if the input values aren't of the same type.
90+
91+
<details><summary>Related work items</summary>
92+
93+
- Issues: [#271][#271]
94+
- PRs: [#322][#322]
95+
96+
<details>
97+
98+
### Added
99+
100+
- Implemented support for referencing parameters in a configuration with the [parameters()][32]
101+
configuration function. This enables you to take advantage of parameterized configurations. Until
102+
this release, you could define but not reference parameters.
103+
104+
Now, you can use the [--parameters][33] and [--parameters-file][34] options with the
105+
[dsc config][35] commands to pass values for any parameter defined in the configuration document.
106+
107+
<details><summary>Related work items</summary>
108+
109+
- Issues: [#49][#49]
110+
- PRs:
111+
- [#291][#291]
112+
- [#294][#294]
113+
114+
</details>
115+
116+
- Added support for authoring DSC Resource manifests in YAML. DSC now recognizes resource manifests
117+
that use the `.dsc.resource.yml` or `.dsc.resource.yaml` file extension instead of only
118+
`.dsc.resource.json`.
119+
120+
<details><summary>Related work Items</summary>
121+
122+
- Issues: [#129][#129]
123+
- PRs: [#311][#311]
124+
125+
</details>
126+
127+
- Added the [DSCConfigRoot][42] environment variable and the [envvar() configuration function][43]
128+
to enable users to reference files and folders relative to the folder containing the
129+
configuration document. DSC automatically creates the `DSCConfigRoot` environment variable when
130+
you use the `--path` option to specify the configuration document instead of passing the document
131+
as a string from stdin or with the `--document` option.
132+
133+
> [!NOTE]
134+
> In this release, DSC doesn't expand the specified path to an absolute path. You should always
135+
> specify the full path to the configuration document if you want to reference the
136+
> `DSCConfigRoot` variable in your configuration. Further, DSC always sets the value for this
137+
> environment variable when you use the `--path` option. If the environment variable is already
138+
> set, it overrides it silently.
139+
>
140+
> In a future release, the variable will be renamed to `DSC_CONFIG_ROOT` and DSC will
141+
> automatically expand relative paths into absolute paths when setting the environment variable.
142+
> It will also emit a warning when it overrides the variable.
143+
144+
<details><summary>Related work Items</summary>
145+
146+
- Issues: [#75][#75]
147+
- PRs: [#313][#313]
148+
149+
</details>
150+
151+
- Added support for using the [dsc config export][44] and [dsc resource export][45] commands with
152+
the PowerShell adapter resource. PSDSC resources can now participate in the `export` command if
153+
they define a static method that returns an array of the PSDSC resource class.
154+
155+
<details><summary>Related work Items</summary>
156+
157+
- Issues: [#183][#183]
158+
- PRs: [#307][#307]
159+
160+
</details>
161+
162+
- Added the `methods` column to the default table view for the console output of the
163+
[dsc resource list][46] command. This new column indicates which methods the resource explicitly
164+
implements. Valid values include `get`, `set`, `test`, and `export`. This information is only
165+
available in the table view. It isn't part of the output object for the command. If you use the
166+
[--format][47] parameter, capture the command output, or redirect the output, the `methods`
167+
information isn't included.
168+
169+
Resources that don't implement `test` rely on DSC's synthetic test behavior instead. They can
170+
still be used for test and set operations.
171+
172+
Resources that don't implement `export` can't be used with the `dsc config export` or
173+
`dsc resource export` commands.
174+
175+
Resources that don't implement `set` can be used for auditing, but not `dsc resource set`. They
176+
can be used with the `dsc config set` command, but only if they're nested inside a
177+
`DSC/AssertionGroup` instance.
178+
179+
<details><summary>Related work Items</summary>
180+
181+
- Issues: [#309][#309]
182+
- PRs: [#314][#314]
183+
184+
</details>
185+
186+
- Added an prototype for a WMI resource adapter to enable users to query WMI. The adapter is
187+
disabled by default, as enumerating the WMI resources can have a performance impact. To enable
188+
it, rename the resource manifest from `wmigroup.dsc.resource.json.optout` to
189+
`wmigroup.dsc.resource.json`.
190+
191+
<details><summary>Related work Items</summary>
192+
193+
- Issues: [#263][#263]
194+
- PRs: [#279][#279]
195+
196+
</details>
197+
29198
## [v3.0.0-alpha.4][release-v3.0.0-alpha.4] - 2023-11-14
30199

31200
This section includes a summary of changes for the `alpha.4` release. For the full list of changes
@@ -78,7 +247,7 @@ in this release, see the [diff on GitHub][compare-v3.0.0-alpha.4].
78247

79248
### Added
80249

81-
- Added the [--input][24] and [--input-file][25] global options to the root `dsc` command. Now, you
250+
- Added the `--input` and `--input-file` global options to the root `dsc` command. Now, you
82251
can pass input to DSC from a variable or file instead of piping from stdin.
83252

84253
<details><summary>Related work items</summary>
@@ -111,7 +280,7 @@ in this release, see the [diff on GitHub][compare-v3.0.0-alpha.4].
111280
- DSC now emits log messages to the stderr stream. This can make it easier to understand what DSC
112281
is doing. This doesn't affect the data output. By default, DSC emits errors, warnings, and
113282
informational messages, but not debug or trace messaging. You can control the level of the
114-
logging with the new [--logging-level][27] option on the root `dsc` command.
283+
logging with the new `--logging-level` option on the root `dsc` command.
115284

116285
<details><summary>Related work items</summary>
117286

@@ -463,19 +632,35 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
463632
[21]: reference/schemas/config/document.md#schema
464633
[22]: reference/schemas/resource/manifest/root.md#schema
465634
[23]: reference/schemas/resource/properties/exist.md
466-
[24]: reference/cli/dsc.md#-i---input
467-
[25]: reference/cli/dsc.md#-p---input-file
468635
[26]: reference/cli/completer/command.md
469-
[27]: reference/cli/dsc.md#-l---logging-level
470636
[28]: reference/schemas/config/functions/overview.md
471637
[29]: reference/schemas/config/functions/base64.md
472638
[30]: reference/schemas/config/functions/concat.md
473639
[31]: reference/schemas/config/functions/resourceId.md
474640

641+
<!-- alpha.5 links -->
642+
[32]: reference/schemas/config/functions/parameters.md
643+
[33]: reference/cli/config/command.md#-p---parameters
644+
[34]: reference/cli/config/command.md#-f---parameters_file
645+
[35]: reference/cli/config/command.md
646+
[36]: reference/cli/dsc.md#-l---trace-level
647+
[37]: reference/cli/dsc.md#-f---trace-format
648+
[38]: reference/schemas/outputs/resource/get.md
649+
[39]: reference/schemas/outputs/resource/set.md
650+
[40]: reference/schemas/outputs/resource/test.md
651+
[41]: reference/schemas/config/functions/concat.md
652+
[42]: reference/cli/config/command.md#environment-variables
653+
[43]: reference/schemas/config/functions/envvar.md
654+
[44]: reference/cli/config/export.md
655+
[45]: reference/cli/resource/export.md
656+
[46]: reference/cli/resource/list.md
657+
[47]: reference/cli/resource/list.md#-f---format
658+
475659
<!-- Issue and PR links -->
476660
[#107]: https://github.com/PowerShell/DSC/issues/107
477661
[#121]: https://github.com/PowerShell/DSC/issues/121
478662
[#127]: https://github.com/PowerShell/DSC/issues/127
663+
[#129]: https://github.com/PowerShell/DSC/issues/129
479664
[#130]: https://github.com/PowerShell/DSC/issues/130
480665
[#133]: https://github.com/PowerShell/DSC/issues/133
481666
[#150]: https://github.com/PowerShell/DSC/issues/150
@@ -484,6 +669,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
484669
[#159]: https://github.com/PowerShell/DSC/issues/159
485670
[#162]: https://github.com/PowerShell/DSC/issues/162
486671
[#163]: https://github.com/PowerShell/DSC/issues/163
672+
[#165]: https://github.com/PowerShell/DSC/issues/165
487673
[#168]: https://github.com/PowerShell/DSC/issues/168
488674
[#171]: https://github.com/PowerShell/DSC/issues/171
489675
[#172]: https://github.com/PowerShell/DSC/issues/172
@@ -494,6 +680,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
494680
[#177]: https://github.com/PowerShell/DSC/issues/177
495681
[#181]: https://github.com/PowerShell/DSC/issues/181
496682
[#182]: https://github.com/PowerShell/DSC/issues/182
683+
[#183]: https://github.com/PowerShell/DSC/issues/183
497684
[#186]: https://github.com/PowerShell/DSC/issues/186
498685
[#197]: https://github.com/PowerShell/DSC/issues/197
499686
[#198]: https://github.com/PowerShell/DSC/issues/198
@@ -506,11 +693,33 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
506693
[#215]: https://github.com/PowerShell/DSC/issues/215
507694
[#216]: https://github.com/PowerShell/DSC/issues/216
508695
[#217]: https://github.com/PowerShell/DSC/issues/217
696+
[#226]: https://github.com/PowerShell/DSC/issues/226
697+
[#227]: https://github.com/PowerShell/DSC/issues/227
509698
[#240]: https://github.com/PowerShell/DSC/issues/240
510699
[#241]: https://github.com/PowerShell/DSC/issues/241
511700
[#248]: https://github.com/PowerShell/DSC/issues/248
512701
[#252]: https://github.com/PowerShell/DSC/issues/252
702+
[#263]: https://github.com/PowerShell/DSC/issues/263
703+
[#266]: https://github.com/PowerShell/DSC/issues/266
704+
[#271]: https://github.com/PowerShell/DSC/issues/271
705+
[#279]: https://github.com/PowerShell/DSC/issues/279
706+
[#284]: https://github.com/PowerShell/DSC/issues/284
707+
[#286]: https://github.com/PowerShell/DSC/issues/286
708+
[#291]: https://github.com/PowerShell/DSC/issues/291
709+
[#294]: https://github.com/PowerShell/DSC/issues/294
710+
[#299]: https://github.com/PowerShell/DSC/issues/299
711+
[#303]: https://github.com/PowerShell/DSC/issues/303
712+
[#305]: https://github.com/PowerShell/DSC/issues/305
713+
[#307]: https://github.com/PowerShell/DSC/issues/307
714+
[#309]: https://github.com/PowerShell/DSC/issues/309
715+
[#311]: https://github.com/PowerShell/DSC/issues/311
716+
[#313]: https://github.com/PowerShell/DSC/issues/313
717+
[#314]: https://github.com/PowerShell/DSC/issues/314
718+
[#318]: https://github.com/PowerShell/DSC/issues/318
719+
[#322]: https://github.com/PowerShell/DSC/issues/322
513720
[#45]: https://github.com/PowerShell/DSC/issues/45
721+
[#49]: https://github.com/PowerShell/DSC/issues/49
514722
[#57]: https://github.com/PowerShell/DSC/issues/57
515723
[#73]: https://github.com/PowerShell/DSC/issues/73
724+
[#75]: https://github.com/PowerShell/DSC/issues/75
516725
[#98]: https://github.com/PowerShell/DSC/issues/98

dsc/docs-conceptual/dsc-3.0/reference/cli/config/command.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Command line reference for the 'dsc config' command
3-
ms.date: 09/06/2023
3+
ms.date: 02/05/2024
44
ms.topic: reference
55
title: dsc config
66
---
@@ -62,6 +62,42 @@ information. For example, `dsc config --help` or `dsc config set --help`.
6262

6363
## Options
6464

65+
### -f, --parameters_file
66+
67+
Specifies the path to a data file containing the parameters to pass to the configuration as JSON or
68+
YAML. When you specify this option, DSC interprets the keys in the data file as parameters and uses
69+
the specified values. The values in the data file override any defaults defined in the
70+
configuration itself.
71+
72+
The data file must contain an object with the `parameters` key. The value of the `parameters` key
73+
must be an object where each key is the name of a defined parameter and each value is a valid value
74+
for that parameter.
75+
76+
This option can't be used with the `--parameters` option. Choose whether to pass the parameters as
77+
a data string with the `--parameters` option or in a data file with the `--parameters_file` option.
78+
79+
For more information about defining parameters in a configuration document, see
80+
[DSC Configuration document parameter schema][06]. For more information about using parameters in
81+
configuration document, see the [parameters function reference][07].
82+
83+
### -p, --parameters
84+
85+
Specifies the parameters to pass to the configuration as a JSON or YAML string. When you specify
86+
this option, DSC interprets the keys in the data string as parameters and uses the specified
87+
values. The values in the data string override any defaults defined in the configuration itself.
88+
89+
The data string must contain an object with the `parameters` key. The value of the `parameters` key
90+
must be an object where each key is the name of a defined parameter and each value is a valid value
91+
for that parameter.
92+
93+
This option can't be used with the `--parameters_file` option. Choose whether to pass the
94+
parameters as a data string with the `--parameters` option or in a data file with the
95+
`--parameters_file` option.
96+
97+
For more information about defining parameters in a configuration document, see
98+
[DSC Configuration document parameter schema][06]. For more information about using parameters in
99+
configuration document, see the [parameters function reference][07].
100+
65101
### -h, --help
66102

67103
Displays the help for the current command or subcommand. When you specify this option, the
@@ -72,8 +108,26 @@ Type: Boolean
72108
Mandatory: false
73109
```
74110
111+
## Environment variables
112+
113+
The `dsc config *` subcommands create the `DSCConfigRoot` environment variable when you call a
114+
command with the `--path` option to specify the configuration document to use for the command. DSC
115+
sets the value of the `DSCConfigRoot` environment variable to the folder containing the specified
116+
configuration document.
117+
118+
> [!NOTE]
119+
> If you use a relative path, DSC doesn't expand the value into a full path before setting the
120+
> environment variable. Always specify the full path to the configuration document when you want to
121+
> use the `DSCConfigRoot` environment variable.
122+
123+
You can use the [envvar][08] configuration function to reference that folder path for resource
124+
instances in the configuration.
125+
75126
[01]: ../resource/command.md
76127
[02]: export.md
77128
[03]: get.md
78129
[04]: set.md
79130
[05]: test.md
131+
[06]: ../../schemas/config/parameter.md
132+
[07]: ../../schemas/config/functions/parameters.md
133+
[08]: ../../schemas/config/functions/envvar.md

0 commit comments

Comments
 (0)