ADDomainController: Ensure Property should be renamed or reimplemented #647
Labels
breaking change
When used on an issue, the issue has been determined to be a breaking change.
enhancement
The issue is an enhancement request.
help wanted
The issue is up for grabs for anyone in the community.
Details of the scenario you tried and the problem that is occurring
The schema for the
ADDomainController
Resource includes theEnsure
property as aread-only
string
:ActiveDirectoryDsc/source/DSCResources/MSFT_ADDomainController/MSFT_ADDomainController.schema.mof
Line 13 in 9346a1d
This is counter to the expectation and idiomatic implementation of the
Ensure
property across DSC Resources, which is taken to be the enforceable state of a Resource.Furthermore, the actual implementation of
Get-TargetResource
forADDomainController
returns$true
or$false
forEnsure
, which is also non-idiomatic (I would expectPresent
orAbsent
):ActiveDirectoryDsc/source/DSCResources/MSFT_ADDomainController/MSFT_ADDomainController.psm1
Line 96 in 9346a1d
ActiveDirectoryDsc/source/DSCResources/MSFT_ADDomainController/MSFT_ADDomainController.psm1
Line 118 in 9346a1d
Suggested solution to the issue
I suggest either renaming the read-only
Ensure
property to something likeIsPromoted
(with aBoolean
type) or reworking the Resource entirely such that it becomes an ensurable resource and theEnsure
property is idiomatic.Version of the DSC module that was used
main
The text was updated successfully, but these errors were encountered: