Microsoft Azure Key Vault support

This commit is contained in:
2025-09-08 11:50:11 +02:00
parent e66907f701
commit ce817cf898
4 changed files with 112 additions and 0 deletions

33
azure_test.go Normal file
View File

@@ -0,0 +1,33 @@
package secret
import (
"os"
"testing"
)
func TestAzureKeyVault(t *testing.T) {
tenant := os.Getenv("AZURE_TENANT_ID")
if tenant == "" {
t.Skip("AZURE_TENANT_ID not set, which should contain the tenant ID for testing")
return
}
vault := os.Getenv("AZURE_KEY_VAULT")
if vault == "" {
t.Skip("AZURE_KEY_VAULT not set, which should contain the name of the Key Vault for testing")
}
p, err := AzureKeyVault(tenant, vault)
if err != nil {
t.Fatal(err)
return
}
v, err := p.GetSecret("test-integration")
if err != nil {
t.Error(err)
return
}
t.Logf("secret: %q", v)
}