Browse Source

Fixed setSecret method for GCP

Signed-off-by: Lilly Daniell <lilly.daniell@engineerbetter.com>
Co-authored-by: William Young <will.young@engineerbetter.com>
Co-authored-by: Adrienne Galloway <adrienne.galloway@engineerbetter.com>
Lilly Daniell 4 years ago
parent
commit
b2efd57455
1 changed files with 7 additions and 0 deletions
  1. 7 0
      pkg/provider/gcp/secretmanager/secretsmanager.go

+ 7 - 0
pkg/provider/gcp/secretmanager/secretsmanager.go

@@ -227,6 +227,13 @@ func (sm *ProviderGCP) SetSecret(ctx context.Context, payload []byte, remoteRef
 	createSecretReq := &secretmanagerpb.CreateSecretRequest{
 		Parent:   fmt.Sprintf("projects/%s", sm.projectID),
 		SecretId: remoteRef.GetRemoteKey(),
+		Secret: &secretmanagerpb.Secret{
+			Replication: &secretmanagerpb.Replication{
+				Replication: &secretmanagerpb.Replication_Automatic_{
+					Automatic: &secretmanagerpb.Replication_Automatic{},
+				},
+			},
+		},
 	}
 
 	secret, err := sm.SecretManagerClient.CreateSecret(ctx, createSecretReq)