I believe the first two template examples on this page are incorrect. To start they are not valid json (see the additional "{" within the configurationArguments property). Additionally the examples do not comply with the settings schema on this page. Specifically the configurationArguments object.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
On top of the obvious schema issue, this page does not elaborate on what members the "configurationArgument" object can have in the new schema version as opposed to what the "property" array was supporting in the old schema. It however suggests that configurationArgument is a like for like replacement for property... however property was clearly an array and from the ARM deploy error messages I get I assume configurationArgument is an object.
I was just about to report the same issue! Pretty frustrating :(
Did any of you manage to get it working?
@mgreenegit any progress on this issue?
I did using the default configuration script. I was going to submit a pull request for the updated docs but haven't had a chance yet. I believe the initial example should look like this:
"name": "Microsoft.Powershell.DSC",
"type": "extensions",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.72",
"autoUpgradeMinorVersion": true,
"forceUpdateTag": "[parameters('dscExtensionUpdateTagVersion')]",
"settings": {
"configurationArguments": {
"RegistrationUrl" : "[parameters('registrationUrl1')]",
"NodeConfigurationName" : "nodeConfigurationNameValue1"
}
},
"protectedSettings": {
"configurationArguments": {
"RegistrationKey": {
"userName": "PLACEHOLDER_DONOTUSE",
"password": "[parameters('registrationKey1')]"
}
}
}
}
The code formatting has not come out as expected. You can see it on my forked version of the docs here: https://github.com/chrisnewark/azure-docs/blob/master/articles/virtual-machines/windows/extensions-dsc-template.md
I am getting an error using the above template " The type property is invalid." for the line "type": "extensions",
@timlt can you take a look into this? @mgreenegit is listed as the author but appears to no longer be contributing here.
Similar to @chrisnewark , here is what I ended up going with:
{
"name": "Microsoft.Powershell.DSC",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.72",
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"Items": {
"registrationKeyPrivate":
"[parameters('registrationKey')]"
}
},
"settings": {
"Properties": [
{
"Name": "RegistrationKey",
"Value": {
"UserName": "PLACEHOLDER_DONOTUSE",
"Password":
"PrivateSettingsRef:registrationKeyPrivate"
},
"TypeName": "System.Management.Automation.PSCredential"
},
{
"Name": "RegistrationUrl",
"Value": "[parameters('registrationUrl')]",
"TypeName": "System.String"
},
{
"Name": "NodeConfigurationName",
"Value": "[parameters('nodeConfigurationName')]",
"TypeName": "System.String"
}
]
}
}
}
Getting the error that type is not defined and once type is defined as below
"type": "extensions",
Getting the error message as type invalid . Are people looking into this issue ?
We are working on getting this correct and will update everyone shortly.
Update
We are working on getting this fixed today.
Is there any update on the issue
Any updates?
@girishgoudar it is taking longer than expected to fix. The team is working on it.
Thank you for catching this. The fix for the example is merging soon. We are reviewing the extension for all schema changes and will update the table ASAP.
Most helpful comment
I did using the default configuration script. I was going to submit a pull request for the updated docs but haven't had a chance yet. I believe the initial example should look like this:
The code formatting has not come out as expected. You can see it on my forked version of the docs here: https://github.com/chrisnewark/azure-docs/blob/master/articles/virtual-machines/windows/extensions-dsc-template.md