Skip to content

Commit

Permalink
Update DSC_SqlAG.psm1
Browse files Browse the repository at this point in the history
Added permission parameter as a mandatory param.
dsccommunity#1761
  • Loading branch information
wahid99 authored Jun 24, 2022
1 parent c71947e commit 6290aeb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions source/DSCResources/DSC_SqlAG/DSC_SqlAG.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
.PARAMETER InstanceName
Name of the SQL instance to be configured.
.PARAMETER Permission
Gets the permission of required service account to allow the cluster to log into SQL.
#>
function Get-TargetResource
{
Expand All @@ -36,6 +39,10 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
$InstanceName

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

Write-Verbose -Message (
Expand Down Expand Up @@ -111,6 +118,9 @@ function Get-TargetResource
.PARAMETER InstanceName
Name of the SQL instance to be configured.
.PARAMETER Permission
Gets the permission of required service account to allow the cluster to log into SQL.
.PARAMETER Ensure
Specifies if the availability group should be present or absent. Default is Present.
Expand Down Expand Up @@ -171,6 +181,10 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
$InstanceName,

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

[Parameter()]
[ValidateSet('Present', 'Absent')]
Expand Down Expand Up @@ -513,6 +527,9 @@ function Set-TargetResource
.PARAMETER InstanceName
Name of the SQL instance to be configured.
.PARAMETER Permission
Gets the permission of required service account to allow the cluster to log into SQL.
.PARAMETER Ensure
Specifies if the availability group should be present or absent. Default is Present.
Expand Down Expand Up @@ -574,6 +591,10 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
$InstanceName,

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

[Parameter()]
[ValidateSet('Present', 'Absent')]
Expand Down

0 comments on commit 6290aeb

Please sign in to comment.