Skip to content

ADDomainController: Ensure Property should be renamed or reimplemented #647

@michaeltlombardi

Description

@michaeltlombardi

Details of the scenario you tried and the problem that is occurring

The schema for the ADDomainController Resource includes the Ensure property as a read-only string:

[Read, Description("Returns the state of the Domain Controller.")] String Ensure;

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 for ADDomainController returns $true or $false for Ensure, which is also non-idiomatic (I would expect Present or Absent):

Suggested solution to the issue

I suggest either renaming the read-only Ensure property to something like IsPromoted (with a Boolean type) or reworking the Resource entirely such that it becomes an ensurable resource and the Ensure property is idiomatic.

Version of the DSC module that was used

  • Latest code on main

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeWhen used on an issue, the issue has been determined to be a breaking change.enhancementThe issue is an enhancement request.help wantedThe issue is up for grabs for anyone in the community.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions