Skip to content

DSC should pass the name field to resource invocations as metadata #783

@michaeltlombardi

Description

@michaeltlombardi

Summary of the new feature / enhancement

As a DSC resource author, I want to be able to provide trace messages with as much usable context to consumers as possible, including the specific resource instance that is being invoked.

Currently, resources don't have access to the name field from a resource instance in a configuration document, so readers of the resource trace messages may not understand which resource instance emitted those messages.

Proposed technical implementation details (optional)

Standardize passing the name field to DSC resources when using dsc config commands as part of the _metadata struct.

Resource authors would have to implement their resources to include the instance name if passed through metadata. For direct invocations with dsc resource commands, the resources shouldn't expect to receive a name for the instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions