Skip to content

Commit

Permalink
SqlSetup: SourcePath should be a mandatory parameter (dsccommunity#1756)
Browse files Browse the repository at this point in the history
- The `SourcePath` parameter is now mandatory for all `*-TargetResource` (issue dsccommunity#1755).
  • Loading branch information
jrdbarnes authored Jun 8, 2022
1 parent d6eebb5 commit 344ac44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
that was not available.
- The loop that evaluates what features are installed did an unnecessary
step for each iteration. A line of code was moved outside of the loop.
- The `SourcePath` parameter is now mandatory for all `*-TargetResource`
([issue #1755](https://github.com/dsccommunity/SqlServerDsc/issues/1755)).

## [15.2.0] - 2021-09-01

Expand Down
6 changes: 3 additions & 3 deletions source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function Get-TargetResource
[System.String]
$Action = 'Install',

[Parameter()]
[Parameter(Mandatory = $true)]
[System.String]
$SourcePath,

Expand Down Expand Up @@ -663,7 +663,7 @@ function Set-TargetResource
[System.String]
$Action = 'Install',

[Parameter()]
[Parameter(Mandatory = $true)]
[System.String]
$SourcePath,

Expand Down Expand Up @@ -1875,7 +1875,7 @@ function Test-TargetResource
[System.String]
$Action = 'Install',

[Parameter()]
[Parameter(Mandatory = $true)]
[System.String]
$SourcePath,

Expand Down
2 changes: 1 addition & 1 deletion source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.schema.mof
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class DSC_SqlSetup : OMI_BaseResource
{
[Write, Description("The action to be performed. Default value is `'Install'`. **NOTE: AddNode is not currently functional.**"), ValueMap{"Install","Upgrade","InstallFailoverCluster","AddNode","PrepareFailoverCluster","CompleteFailoverCluster"}, Values{"Install","Upgrade","InstallFailoverCluster","AddNode","PrepareFailoverCluster","CompleteFailoverCluster"}] String Action;
[Write, Description("The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path.")] String SourcePath;
[Required, Description("The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path.")] String SourcePath;
[Write, EmbeddedInstance("MSFT_Credential"), Description("Credentials used to access the path set in the parameter **SourcePath**. See section [Considerations](#considerations) regarding the parameter **SourceCredential**.")] String SourceCredential;
[Write, Description("Suppresses reboot.")] Boolean SuppressReboot;
[Write, Description("Forces reboot.")] Boolean ForceReboot;
Expand Down

0 comments on commit 344ac44

Please sign in to comment.