Skip to content

Commit

Permalink
[KV] Log error when HSM security domain download fails (Azure#24687)
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoyp authored and sarkar-rajarshi committed Jun 9, 2022
1 parent fbb4ba2 commit cf9b6b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
"rwdlacu",
"scbedd",
"sdist",
"sdpath",
"secbak",
"SECG",
"SECP",
Expand Down
8 changes: 7 additions & 1 deletion sdk/keyvault/test-resources-post.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ if (Test-Path $sdpath) {
Remove-Item $sdPath -Force
}

Export-AzKeyVaultSecurityDomain -Name $hsmName -Quorum 2 -Certificates $wrappingFiles -OutputPath $sdPath
Export-AzKeyVaultSecurityDomain -Name $hsmName -Quorum 2 -Certificates $wrappingFiles -OutputPath $sdPath -ErrorAction SilentlyContinue -Verbose
if ( !$? ) {
Write-Host $Error[0].Exception
Write-Error $Error[0]

exit
}

Log "Security domain downloaded to '$sdPath'; Managed HSM is now active at '$hsmUrl'"

Expand Down

0 comments on commit cf9b6b2

Please sign in to comment.