The resource does not return the key properties of Name and AvailabilityGorupName when the current state is Absent. This result in unneccassry logic in Test-TargetResource.
The key properties Name and AvailabilityGorupName should always be returned from the Get-TargetResource. Test-TargetResource should not evaluate those two properties.
Problem description
The resource does not return the key properties of
Name
andAvailabilityGorupName
when the current state is Absent. This result in unneccassry logic inTest-TargetResource
.https://github.com/dsccommunity/SqlServerDsc/blob/d5692e24b3b6303556729639cbb0b2a6763198af/source/DSCResources/DSC_SqlAGReplica/DSC_SqlAGReplica.psm1#L675-L676
Verbose logs
DSC configuration
Suggested solution
The key properties
Name
andAvailabilityGorupName
should always be returned from theGet-TargetResource
.Test-TargetResource
should not evaluate those two properties.SQL Server edition and version
SQL Server PowerShell modules
Operating system
PowerShell version
SqlServerDsc version