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:
@@ -5,7 +5,10 @@ function Resolve-ConfigurationDataValue {
|
||||
$Value,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
$Context
|
||||
$Context,
|
||||
|
||||
[object[]]
|
||||
$Path = @()
|
||||
)
|
||||
|
||||
if($null -eq $Value){
|
||||
@@ -18,7 +21,7 @@ function Resolve-ConfigurationDataValue {
|
||||
if($Entry.Name -eq "Sealed"){
|
||||
continue
|
||||
}
|
||||
$Resolved[$Entry.Name] = Resolve-ConfigurationDataValue -Value $Entry.Value -Context $Context
|
||||
$Resolved[$Entry.Name] = Resolve-ConfigurationDataValue -Value $Entry.Value -Context $Context -Path (@($Path) + @($Entry.Name))
|
||||
}
|
||||
return $Resolved
|
||||
}
|
||||
@@ -29,21 +32,27 @@ function Resolve-ConfigurationDataValue {
|
||||
if($Entry.Name -eq "Sealed"){
|
||||
continue
|
||||
}
|
||||
$Resolved[$Entry.Name] = Resolve-ConfigurationDataValue -Value $Entry.Value -Context $Context
|
||||
$Resolved[$Entry.Name] = Resolve-ConfigurationDataValue -Value $Entry.Value -Context $Context -Path (@($Path) + @($Entry.Name))
|
||||
}
|
||||
return $Resolved
|
||||
}
|
||||
|
||||
if($Value -is [System.Array] -and $Value -isnot [string]){
|
||||
$Resolved = @()
|
||||
foreach($Item in $Value){
|
||||
$Resolved += ,(Resolve-ConfigurationDataValue -Value $Item -Context $Context)
|
||||
for($Index = 0; $Index -lt $Value.Count; $Index++){
|
||||
$Resolved += ,(Resolve-ConfigurationDataValue -Value $Value[$Index] -Context $Context -Path (@($Path) + @($Index)))
|
||||
}
|
||||
return ,$Resolved
|
||||
}
|
||||
|
||||
if($Value -is [string] -and (Test-ConfigurationDataExpression -Value $Value)){
|
||||
return Resolve-ConfigurationDataExpression -Expression $Value -Context $Context
|
||||
$PreviousPath = @($Context.CurrentPath)
|
||||
$Context.CurrentPath = @($Path)
|
||||
try {
|
||||
return Resolve-ConfigurationDataExpression -Expression $Value -Context $Context
|
||||
} finally {
|
||||
$Context.CurrentPath = $PreviousPath
|
||||
}
|
||||
}
|
||||
|
||||
return $Value
|
||||
|
||||
Reference in New Issue
Block a user