Skip to content

Commit

Permalink
Issue 1164 (#1172)
Browse files Browse the repository at this point in the history
Fixes #1164

---------

Co-authored-by: freddydk <[email protected]>
  • Loading branch information
freddydk and freddydk authored Aug 19, 2024
1 parent 6c58752 commit a2c4efc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Actions/ReadSecrets/ReadSecretsHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function GetAzureCredentials {
return $null
}


function MaskValue {
Param(
[string] $key,
Expand Down Expand Up @@ -119,6 +118,16 @@ function GetKeyVaultCredentials {
$creds = $null
}
}
if ($creds) {
try {
# check that we have access to get secrets from the keyvault by trying to get a dummy secret
GetKeyVaultSecret -secretName 'algodummysecret' -keyVaultCredentials $creds -encrypted | Out-Null
}
catch {
Write-Host "Unable to get secrets from Azure Key Vault. Error was $($_.Exception.Message). Using Github secrets instead."
$creds = $null
}
}
return $creds
}

Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Fix issue with github ref when running reusable workflows
- Issue 1098 Support for specifying the name of the AZURE_CREDENTIALS secret by adding a AZURE_CREDENTIALSSecretName setting
- Fix placeholder syntax for git ref in PullRequestHandler.yaml
- Issue 1164 Getting secrets from Azure key vault fails in Preview

### Dependencies to PowerShell modules

Expand Down

0 comments on commit a2c4efc

Please sign in to comment.