Enhance configuration data handling with new reference resolution functions, dummy secret support, and update module version to 1.1.0

This commit is contained in:
Torsten Brendgen
2026-07-07 21:50:50 +02:00
parent 45e71c093c
commit 4b67c74ac0
11 changed files with 287 additions and 5 deletions

View File

@@ -7,7 +7,11 @@ function Resolve-ConfigurationDataParameterSecrets {
[Parameter(Mandatory=$false)]
[hashtable]
$ProviderSettings = @{}
$ProviderSettings = @{},
[Parameter(Mandatory=$false)]
[switch]
$UseDummySecrets
)
$ResolvedConfigurationData = $ConfigurationData.Clone()
@@ -32,7 +36,11 @@ function Resolve-ConfigurationDataParameterSecrets {
$ExpectedType = $TypeName.ToLowerInvariant()
foreach($ValueKey in @("Value", "DefaultValue")){
if((Test-ConfigurationDataMapContainsKey -Map $Definition -Key $ValueKey) -and (Test-ConfigurationDataSecretReference -Value $Definition[$ValueKey])){
$Definition[$ValueKey] = Resolve-ConfigurationDataSecretReference -Reference $Definition[$ValueKey] -ExpectedType $ExpectedType -ProviderSettings $ProviderSettings
if($UseDummySecrets){
$Definition[$ValueKey] = New-ConfigurationDataDummySecretValue -ExpectedType $ExpectedType -Reference $Definition[$ValueKey] -ParameterName $Parameter.Name
}else{
$Definition[$ValueKey] = Resolve-ConfigurationDataSecretReference -Reference $Definition[$ValueKey] -ExpectedType $ExpectedType -ProviderSettings $ProviderSettings
}
}
}
}