Add new functions for credential handling, node lookup, and context-aware parameter overrides; update module version to 1.2.0
This commit is contained in:
@@ -15,6 +15,7 @@ function Resolve-ConfigurationDataParameterSecrets {
|
||||
)
|
||||
|
||||
$ResolvedConfigurationData = $ConfigurationData.Clone()
|
||||
$Context = New-ConfigurationDataResolutionContext -ConfigurationData $ResolvedConfigurationData
|
||||
|
||||
if($ResolvedConfigurationData.ContainsKey("Parameters")){
|
||||
$ResolvedConfigurationData.Parameters = $ResolvedConfigurationData.Parameters.Clone()
|
||||
@@ -36,10 +37,19 @@ function Resolve-ConfigurationDataParameterSecrets {
|
||||
$ExpectedType = $TypeName.ToLowerInvariant()
|
||||
foreach($ValueKey in @("Value", "DefaultValue")){
|
||||
if((Test-ConfigurationDataMapContainsKey -Map $Definition -Key $ValueKey) -and (Test-ConfigurationDataSecretReference -Value $Definition[$ValueKey])){
|
||||
$SecretReference = $Definition[$ValueKey]
|
||||
if($UseDummySecrets){
|
||||
$Definition[$ValueKey] = New-ConfigurationDataDummySecretValue -ExpectedType $ExpectedType -Reference $Definition[$ValueKey] -ParameterName $Parameter.Name
|
||||
$Definition[$ValueKey] = New-ConfigurationDataDummySecretValue -ExpectedType $ExpectedType -Reference $SecretReference -ParameterName $Parameter.Name
|
||||
}else{
|
||||
$Definition[$ValueKey] = Resolve-ConfigurationDataSecretReference -Reference $Definition[$ValueKey] -ExpectedType $ExpectedType -ProviderSettings $ProviderSettings
|
||||
$Definition[$ValueKey] = Resolve-ConfigurationDataSecretReference -Reference $SecretReference -ExpectedType $ExpectedType -ProviderSettings $ProviderSettings -Context $Context
|
||||
}
|
||||
|
||||
if($ExpectedType -eq "credential" -and
|
||||
$UseDummySecrets -and
|
||||
(Test-ConfigurationDataMapContainsKey -Map $SecretReference -Key "Domain")){
|
||||
$Domain = Get-ConfigurationDataMapValue -Map $SecretReference -Key "Domain"
|
||||
$Domain = Resolve-ConfigurationDataValue -Value $Domain -Context $Context
|
||||
$Definition[$ValueKey] = ConvertTo-ConfigurationDataDomainCredential -Credential $Definition[$ValueKey] -Domain ([string]$Domain)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user