Skip to content

Commit

Permalink
Added support for SettingDefinitionId
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Oct 1, 2024
1 parent 8d38af2 commit 5680261
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added the SettingDefinitionId parameter to the mergeable parameters, so that UniqueId
is not required in those instances.

## [0.1.19] - 2024-09-18

### Added
Expand Down
4 changes: 3 additions & 1 deletion source/Private/Get-AttributeString.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ function Get-AttributeString
{
$ConfigData.$($Property.Name) = @(@{})

if ($embeddedSchemas.Attributes.Name -notcontains "Id" -and $embeddedSchemas.Attributes.Name -notcontains "Identity")
if ($embeddedSchemas.Attributes.Name -notcontains "Id" -and `
$embeddedSchemas.Attributes.Name -notcontains "Identity" -and `
$embeddedSchemas.Attributes.Name -notcontains "SettingDefinitionId")
{
$ConfigData.$($property.Name)[0].UniqueId = ('{0} | {1} | {2}' -f "String", "Required", "[Unique ID to identify this specific object]")
}
Expand Down
2 changes: 1 addition & 1 deletion source/Public/New-CompositeResourceModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ function New-CompositeResourceModule

# Check if the resource needs a UniqueId parameter by checking if the names of the properties contain
# any of the below property names. If they don't, a UniqueId is required.
$propertiesNeedUniqueId = @("Id", "Identity", "IsSingleInstance")
$propertiesNeedUniqueId = @("Id", "Identity", "SettingDefinitionId", "IsSingleInstance")
$diff = Compare-Object -ReferenceObject $filteredProperties.Name -DifferenceObject $propertiesNeedUniqueId -ExcludeDifferent -IncludeEqual
if ($null -eq $diff)
{
Expand Down

0 comments on commit 5680261

Please sign in to comment.