Closed wahid99 closed 2 years ago
Agree that it looks like the Permission
should be made mandatory.
Happy to review a PR that fixes this. 🙂
https://github.com/dsccommunity/SqlServerDsc/pull/1762
Kindly review. Thanks
PR looks okay. But looking at the resource as a whole I think the entire resource should be refactored to remove Ensure parameter. It should instead have the parameters Permission
, PermissionToInclude
, and PermissionToExclude
. The PR #1769 has done such refactor on SqlDatabasePermission. I think we need to do a similar refactor on this resource. I create a new issue to track this. Outside of your PR.
Problem description
When doing a get on SQLPermission resource it expects the parameter 'permission' to be passed into it. If the permission parameter isn't passed through then we hit an Exception.
Verbose logs
DSC configuration
Suggested solution
make permission to be a mandatory parameter in the sqlpermission resource. Doing this returns without any problems.
SQL Server edition and version
SQL Server PowerShell modules
Operating system
PowerShell version
SqlServerDsc version