DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Make `Include` resource use more like a composite resource

Open SteveL-MSFT opened this issue 1 year ago • 3 comments

Summary of the new feature / enhancement

Currently, if you Include a nested configuration which has parameter, it has to be passed in as a separate file. Instead, we should allow the parameters to be passed in via the parent configuration.

Proposed technical implementation details (optional)

Example of how this could look:

$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
resources:
- name: get os info
  type: Microsoft.DSC/Include
  properties:
    configurationFile: osinfo_parameters.dsc.yaml
    parameters:
      osFamily: macOS

SteveL-MSFT avatar Oct 25 '24 17:10 SteveL-MSFT

This can build off of https://github.com/PowerShell/DSC/pull/626 by adding configuration and parameters to the Kind enum that takes an object.

SteveL-MSFT avatar Jan 16 '25 04:01 SteveL-MSFT

Deferring this as Bicep's module concept removes the need for this when using Bicep

SteveL-MSFT avatar Aug 07 '25 03:08 SteveL-MSFT

I'm currently using the string function to get around this

haodeon avatar Oct 08 '25 10:10 haodeon