Skip to content

Commit d3b87ed

Browse files
committed
fix merge conflicts
2 parents 0687281 + 2fc0525 commit d3b87ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3564
-635
lines changed

.vscode/docs.code-snippets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
" - Issues: [#${2:related issue id}][#${2:related issue id}]",
138138
" - PRs: [#${3:related pull request id}][#${3:related pull request id}]",
139139
"",
140-
" <details>",
140+
" </details>",
141141
""
142142
]
143143
}
@@ -155,7 +155,7 @@
155155
" - PRs:",
156156
" - [#${3:related pull request id}][#${3:related pull request id}]",
157157
"",
158-
" <details>",
158+
" </details>",
159159
""
160160
]
161161
}

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"./dsc_lib/Cargo.toml",
55
"./osinfo/Cargo.toml",
66
"./registry/Cargo.toml",
7+
"./runcommandonset/Cargo.toml",
78
"./tools/test_group_resource/Cargo.toml",
89
"./tools/dsctest/Cargo.toml",
910
"./tree-sitter-dscexpression/Cargo.toml",

CHANGELOG.md

Lines changed: 532 additions & 45 deletions
Large diffs are not rendered by default.

docs/reference/cli/config/command.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,14 @@ Mandatory: false
110110
111111
## Environment variables
112112
113-
The `dsc config *` subcommands create the `DSCConfigRoot` environment variable when you call a
113+
The `dsc config *` subcommands create the `DSC_CONFIG_ROOT` environment variable when you call a
114114
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.
115+
sets the value of the `DSC_CONFIG_ROOT` environment variable to the full path of the folder
116+
containing the specified configuration document.
117117

118118
> [!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.
119+
> If you define the `DSC_CONFIG_ROOT` variable outside of DSC, DSC raises a warning when it
120+
> overrides the existing environment variable's value for an operation.
122121

123122
You can use the [envvar][08] configuration function to reference that folder path for resource
124123
instances in the configuration.

docs/reference/cli/config/get.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ document saved as `example.dsc.config.yaml`.
4949

5050
```yaml
5151
# example.dsc.config.yaml
52-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
52+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
5353
resources:
5454
- name: Windows only
5555
type: DSC/AssertionGroup
5656
properties:
57-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
57+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
5858
resources:
5959
- name: os
6060
type: Microsoft/OSInfo

docs/reference/cli/config/set.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ The command inspects the resource instances defined in the configuration documen
5050

5151
```yaml
5252
# example.dsc.config.yaml
53-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
53+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
5454
resources:
5555
- name: Windows only
5656
type: DSC/AssertionGroup
5757
properties:
58-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
58+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
5959
resources:
6060
- name: os
6161
type: Microsoft/OSInfo

docs/reference/cli/config/test.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ resource instances defined in the configuration document saved as `example.dsc.c
4949

5050
```yaml
5151
# example.dsc.config.yaml
52-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
52+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
5353
resources:
5454
- name: Windows only
5555
type: DSC/AssertionGroup
5656
properties:
57-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
57+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
5858
resources:
5959
- name: os
6060
type: Microsoft/OSInfo

docs/reference/cli/resource/delete.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
---
2+
description: Command line reference for the 'dsc resource delete' command
3+
ms.date: 05/08/2024
4+
ms.topic: reference
5+
title: dsc resource delete
6+
---
7+
8+
# dsc resource delete
9+
10+
## Synopsis
11+
12+
Invokes the delete operation of a resource.
13+
14+
## Syntax
15+
16+
### Without instance properties
17+
18+
```sh
19+
dsc resource delete [Options] --resource <RESOURCE>
20+
```
21+
22+
### Instance properties from stdin
23+
24+
```sh
25+
<instance-properties> | dsc resource delete [Options] --resource <RESOURCE>
26+
```
27+
28+
### Instance properties from input option
29+
30+
```sh
31+
dsc resource delete --input '<instance-properties>' --resource <RESOURCE>
32+
```
33+
34+
### Instance properties from file
35+
36+
```sh
37+
dsc resource delete --path <instance-properties-filepath> --resource <RESOURCE>
38+
```
39+
40+
## Description
41+
42+
The `delete` subcommand removes a resource instance.
43+
44+
Any properties the resource requires for discerning which instance to delete must be passed to this
45+
command as a JSON or YAML object. The object can be passed to this command from stdin or with the
46+
`--input` option. You can also use the `--path` option to read the object from a JSON or YAML file.
47+
48+
This command returns no output when successful. If it encounters an error, it surfaces the error to
49+
the caller on stderr and exits with a non-zero exit code.
50+
51+
## Examples
52+
53+
### Example 1 - delete resource instance with input option
54+
55+
If a resource requires one or more property values to return the actual state of the instance, the
56+
instance properties can be passed with the **input** option as either JSON or YAML.
57+
58+
```sh
59+
dsc resource delete --resource Microsoft.Windows/Registry --input '{
60+
"keyPath": "HKCU\\DSC\\Example"
61+
}'
62+
```
63+
64+
### Example 2 - delete resource instance with input from stdin
65+
66+
If a resource requires one or more property values to return the actual state of the instance, the
67+
instance properties can be passed over stdin as either JSON or YAML.
68+
69+
```sh
70+
'{
71+
"keyPath": "HKCU\\DSC\\Example"
72+
}' | dsc resource delete --resource Microsoft.Windows/Registry
73+
```
74+
75+
### Example 3 - delete resource instance with input from a YAML file
76+
77+
If a resource requires one or more property values to return the actual state of the instance, the
78+
instance properties can be retrieved from a saved JSON or YAML file.
79+
80+
```sh
81+
cat ./example.delete.yaml
82+
```
83+
84+
```yaml
85+
keyPath: HKCU\\DSC\\Example
86+
```
87+
88+
```sh
89+
dsc resource delete --resource Microsoft.Windows/Registry --path ./example.delete.yaml
90+
```
91+
92+
## Options
93+
94+
### -r, --resource
95+
96+
Specifies the fully qualified type name of the DSC Resource to use, like
97+
`Microsoft.Windows/Registry`.
98+
99+
The fully qualified type name syntax is: `<owner>[.<group>][.<area>]/<name>`, where:
100+
101+
- The `owner` is the maintaining author or organization for the resource.
102+
- The `group` and `area` are optional name components that enable namespacing for a resource.
103+
- The `name` identifies the component the resource manages.
104+
105+
```yaml
106+
Type: String
107+
Mandatory: true
108+
```
109+
110+
### -i, --input
111+
112+
Specifies a JSON or YAML object with the properties needed for retrieving an instance of the DSC
113+
Resource. DSC validates the object against the resource's instance schema. If the validation fails,
114+
DSC raises an error.
115+
116+
This option can't be used with instance properties over stdin or the `--path` option. Choose
117+
whether to pass the instance properties to the command over stdin, from a file with the `--path`
118+
option, or with the `--input` option.
119+
120+
DSC ignores this option when the `--all` option is specified.
121+
122+
```yaml
123+
Type: String
124+
Mandatory: false
125+
```
126+
127+
### -p, --path
128+
129+
Defines the path to a text file to read as input for the command instead of piping input from stdin
130+
or passing it as a string with the `--input` option. The specified file must contain JSON or YAML
131+
that represents valid properties for the resource. DSC validates the object against the resource's
132+
instance schema. If the validation fails, or if the specified file doesn't exist, DSC raises an
133+
error.
134+
135+
This option is mutually exclusive with the `--input` option. When you use this option, DSC
136+
ignores any input from stdin.
137+
138+
DSC ignores this option when the `--all` option is specified.
139+
140+
```yaml
141+
Type: String
142+
Mandatory: false
143+
```
144+
145+
### -h, --help
146+
147+
Displays the help for the current command or subcommand. When you specify this option, the
148+
application ignores all options and arguments after this one.
149+
150+
```yaml
151+
Type: Boolean
152+
Mandatory: false
153+
```
154+
155+
## Output
156+
157+
This command returns no output when successful. When the resource errors, DSC surfaces the error on
158+
stderr and exits with a non-zero exit code.

0 commit comments

Comments
 (0)