From 3c1ce74c39e5d4f8b16a23f394fd7a7ed08b20b5 Mon Sep 17 00:00:00 2001 From: gak Date: Thu, 23 May 2024 05:53:20 +1000 Subject: [PATCH] fix: oops --- common/configuration/aws_secrets_provider.go | 43 -------------------- 1 file changed, 43 deletions(-) delete mode 100644 common/configuration/aws_secrets_provider.go diff --git a/common/configuration/aws_secrets_provider.go b/common/configuration/aws_secrets_provider.go deleted file mode 100644 index cd27546b23..0000000000 --- a/common/configuration/aws_secrets_provider.go +++ /dev/null @@ -1,43 +0,0 @@ -package configuration - -import ( - "context" - _ "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager" - _ "github.com/aws/aws-sdk-go-v2/service/secretsmanager" - "log" -) - -func brainstorm() { - cfg, err := config.LoadDefaultConfig(context.TODO(), - config.WithRegion("us-west-2"), - ) - if err != nil { - log.Fatalf("unable to load SDK config, %v", err) - } - - svc := secretsmanager.NewFromConfig(cfg) - - // create a secret - name := "test-secret" - secret := "hunter1" - _, err = svc.CreateSecret(context.TODO(), &secretsmanager.CreateSecretInput{ - Name: &name, - SecretString: &secret, - }) - if err != nil { - log.Fatalf("failed to create secret, %v", err) - } - - // get the secret - out, err := svc.GetSecretValue(context.TODO(), &secretsmanager.GetSecretValueInput{ - SecretId: &name, - }) - if err != nil { - log.Fatalf("failed to retrieve secret, %v", err) - } - - log.Printf("retrieved secret: %s", *out.SecretString) - -}