opscode/chef — pull request #1877 by adamedx (2014-08-21 13:29:51+00:00)
Title: Adamedx/dsc configuration data

To fully support PowerShell DSC, the `ConfigurationData` switch of the DSC `Configuration` clause in PowerShell must be supported. The `dsc_script` resource supports it by adding two new attributes, `configuration_data` and `configuration_data_script`, which allow the specification of DSC configuration data via direct embedding of code and reference to a file system location with a script respectively. The actual data content must be in the PowerShell Data Module format which is typically found in a `.psd1` file.

Note that while configuration data itself is specified via the PowerShell language, `.psd1` data is actually a subset of PowerShell designed to allow only the specification of data and not the evaluation of arbitrary code. Since the provider implementation passes the `.psd1` data to the cmdlet that results from the `Configuration` clause as a file system path that points to a file that contains the data, rules about adhering to that subset will be enforced and attempts to subvert the restrictions on the content of `.psd1` files will result in exceptions raised by PowerShell.