DscWorkshop
DscWorkshop copied to clipboard
Issues with Depends on
In the following Example:
Disks:
Disks:
- DiskId: 2
DiskIdType: Number
DriveLetter: F
PartitionStyle: GPT
FSFormat: NTFS
FilesAndFolders:
Items:
- DestinationPath: F:\ReleaseA\Admin
Type: Directory
Ensure: Present
DependsOn: '[Disk]2'
DependsOn: '[Disk]2' Throws an error and the resource seems to be malformed? Perhaps this is just user error?
Well, using 'DependsOn' is an issue at the moment. I have solved that but the solution is not yet public. I should have some time to in the evening to write a detailed description of the solution.
The short answer though is that it should either be handled by the composites for DependsOn within a composite, or the DependsOn should be at the Composite level for dependencies between composites. So I assume it's more of a CommonTasks issue.
No, @gaelcolas, unfortunately it is more a DSC issue doing too many checks on the format if the DependsOn value. I need to go back in the commit history of one of the projects to find the details.
And the more complex the config data gets, the more you need to make dependencies between individual resources defined in different composites.