Skip to content

Commit

Permalink
Fixed several issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Jul 3, 2024
1 parent d1ef16c commit 5b56d32
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added the UsedWorkloads section to the Environments section in the Example Data File
- Added a dependency to the SCSensitivityLabel resources for SCAutoSensitivityLabelPolicy

### Fixed

- Fixed issue were an array was not correctly created where this was required

## [0.1.15] - 2024-06-04

### Changed
Expand Down
1 change: 1 addition & 0 deletions source/Dependencies.psd1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@{
SCAutoSensitivityLabelPolicy = '$ConfigurationData.NonNodeData.SecurityCompliance.SensitivityLabels.Name | ForEach-Object { "[SCSensitivityLabel]SCSensitivityLabel-{0}" -f $_ }'
SCAutoSensitivityLabelRule = '$ConfigurationData.NonNodeData.SecurityCompliance.AutoSensitivityLabelPolicies.Name | ForEach-Object { "[SCAutoSensitivityLabelPolicy]SCAutoSensitivityLabelPolicy-{0}" -f $_ }'
SCCaseHoldRule = '$ConfigurationData.NonNodeData.SecurityCompliance.CaseHoldPolicies | ForEach-Object { "[SCCaseHoldPolicy]SCCaseHoldPolicy-{0}-{1}" -f $_.Name,$_.Case }'
SCCaseHoldPolicy = '$ConfigurationData.NonNodeData.SecurityCompliance.ComplianceCases.Name | ForEach-Object { "[SCComplianceCase]SCComplianceCase-{0}" -f $_ }'
Expand Down
5 changes: 4 additions & 1 deletion source/Public/New-CompositeResourceModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function New-CompositeResourceModule
}
)
}
UsedWorkloads = @{}
Tokens = @{
ExampleToken = 'String | Optional | Example of a token that can be used anywhere in the config, by specifying {{ExampleToken}}'
}
Expand Down Expand Up @@ -228,6 +229,8 @@ function New-CompositeResourceModule
$configData.NonNodeData.$resourceWorkload = [Ordered]@{}
}

$configData.NonNodeData.Environment.UsedWorkloads.$resourceWorkload = $true

# Initialize new composite resource content
$configString = [System.Text.StringBuilder]::new()
[void]$configString.AppendLine("# ($(Get-Date -f 'yyyy-MM-dd HH:mm:ss')) Generated using Microsoft365DSC v$($m365Module.Version)")
Expand Down Expand Up @@ -479,7 +482,7 @@ function New-CompositeResourceModule
if ($propertyDataType -like "*Array")
{
$propertyDataType = $propertyDataType -replace "Array"
$result = ('{0} | {1} | {2} | {3}' -f $propertyDataType, $state, $property.Description, ($property.ValueMap -join ' / '))
$result = @(('{0} | {1} | {2} | {3}' -f $propertyDataType, $state, $property.Description, ($property.ValueMap -join ' / ')))
}
else
{
Expand Down

0 comments on commit 5b56d32

Please sign in to comment.