- 
                Notifications
    You must be signed in to change notification settings 
- Fork 54
Open
Labels
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Summary
Whilst working on #1208, another issue popped up. I have the following configuration document:
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
parameters:
  myString:
    type: secureString
    defaultValue: "MySecret"
resources:
- name: Class-resource Info
  type: TestClassResource/TestClassResource
  properties:
    Name: 'TestClassResource'
    SecureStringProp: "[parameters('myString')]"Instead of parsing the input through the adapter as such (seen in the logging):
{"resources":[{"name":"TestClassResource/TestClassResource","type":"TestClassResource/TestClassResource","properties":{"Name":"TestClassResource","SecureStringProp":"MySecret"}}],"metadata":{"Microsoft.DSC":{"context":"configuration"}}}
It does it like:
jsonInput={"resources":[{"name":"TestClassResource/TestClassResource","type":"TestClassResource/TestClassResource","properties":{"Name":"TestClassResource","SecureStringProp":{"secureString":"MySecret"}}}],"metadata":{"Microsoft.DSC":{"context":"configuration"}}}
Which results in the following error: Exception setting "SecureStringProp": "Cannot create object of type "System.Security.SecureString". The property 'secureString' was not found for the 'System.Security.SecureString' object. There is no settable property available."
Steps to reproduce
See steps above.
Expected behavior
The secure string is parsed as stringActual behavior
The secure string is parsed as objectError details
Environment data
Name                           Value
----                           -----
PSVersion                      7.5.3
PSEdition                      Core
GitCommitId                    7.5.3
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0Version
dsc 3.2.0-preview.6
Visuals
No response