Add Azure Key Vault support and enhance credential handling in configuration data

This commit is contained in:
Torsten Brendgen
2026-07-03 10:34:25 +02:00
parent 9b36693444
commit 943894b8fe
8 changed files with 453 additions and 3 deletions

View File

@@ -20,6 +20,11 @@ function Assert-ConfigurationDataParameterType {
switch($TypeName){
"string" {
if(Test-ConfigurationDataSecretReference -Value $Value){
Assert-ConfigurationDataSecretReference -Name $Name -TypeName "string" -Value $Value
return
}
if($Value -isnot [string]){
throw "Parameter [$Name] expects type [string], but received [$($Value.GetType().Name)]."
}

View File

@@ -6,7 +6,7 @@ function Assert-ConfigurationDataSecretReference {
$Name,
[Parameter(Mandatory=$true)]
[ValidateSet("credential", "securestring")]
[ValidateSet("credential", "securestring", "string")]
[string]
$TypeName,

View File

@@ -25,7 +25,7 @@ function Resolve-ConfigurationDataParameterSecrets {
$ResolvedConfigurationData.Parameters[$Parameter.Name] = $Definition
$TypeName = [string](Get-ConfigurationDataMapValue -Map $Definition -Key "Type" -DefaultValue "")
if($TypeName -notin @("credential", "secureString")){
if($TypeName -notin @("credential", "secureString", "string")){
continue
}

View File

@@ -17,7 +17,10 @@ function Resolve-ConfigurationDataProviderSettingsPath {
return (Join-Path -Path (Get-Location).Path -ChildPath $FileName)
}
if((Test-Path -Path $SettingsPath -PathType Container) -or $SettingsPath.EndsWith("\") -or $SettingsPath.EndsWith("/")){
if((Test-Path -Path $SettingsPath -PathType Container) -or
$SettingsPath.EndsWith("\") -or
$SettingsPath.EndsWith("/") -or
[string]::IsNullOrWhiteSpace([System.IO.Path]::GetExtension($SettingsPath))){
return (Join-Path -Path $SettingsPath -ChildPath $FileName)
}