feat: STACKIT Secrets Manager Action
Some checks failed
Release Secrets Manager Action / build (push) Has been cancelled
Some checks failed
Release Secrets Manager Action / build (push) Has been cancelled
This commit is contained in:
commit
cc0c27a4e9
9 changed files with 401 additions and 0 deletions
27
main.go
Normal file
27
main.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
|
||||
"secretsmanager/config"
|
||||
"secretsmanager/secretsmanager"
|
||||
|
||||
"github.com/caarlos0/env/v11"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var cfg config.Config
|
||||
err := env.Parse(&cfg)
|
||||
if err != nil {
|
||||
log.Fatalf("Error parsing environment variables %s", err)
|
||||
}
|
||||
cfg = config.ValidateConfig(cfg)
|
||||
|
||||
s := secretsmanager.InitializeClient(cfg)
|
||||
data, _ := secretsmanager.GetSecrets(&s, cfg)
|
||||
|
||||
for _, secret := range data {
|
||||
fmt.Println(secret)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue