Files
secret/script/vault-setup.ps1
maze ce6df720f9
Some checks failed
Test / tests (darwin-amd64) (push) Successful in 20s
Test / tests (windows-amd64) (push) Failing after 24s
Test / tests (linux-amd64) (push) Successful in 26s
Run Gosec / tests (push) Successful in 51s
Test / tests (linux-arm64) (push) Has been cancelled
Moar bugs squashed
2025-09-09 17:09:48 +02:00

11 lines
484 B
PowerShell
Executable File

if ($null -eq $env:TEST_VAULT_KEY) { $env:TEST_VAULT_KEY = 'secret/test' }
if ($null -eq $env:TEST_VAULT_VALUE) { $env:TEST_VAULT_VALUE = 'It works!' }
# Populate our test secrets
Write-Output "🔐 Populating test secrets:"
& ".\vault.exe" kv put "${env:TEST_VAULT_KEY}" data="${env:TEST_VAULT_VALUE}"
# Populate our test transit backend with key
Write-Output "🔐 Populating test transit backend:"
& ".\vault.exe" secrets enable transit
& ".\vault.exe" write -f transit/keys/test