From 05711954578d115e42dc46aa55ac579ed12cfbe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Mon, 15 Apr 2019 16:06:46 +0100 Subject: [PATCH] gcs: Fixed scopes for inline ServiceAccount option. (#1033) Without this that option was unusable. Signed-off-by: Bartek Plotka --- pkg/objstore/gcs/gcs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/objstore/gcs/gcs.go b/pkg/objstore/gcs/gcs.go index 7743b9449f..e4f6a7295a 100644 --- a/pkg/objstore/gcs/gcs.go +++ b/pkg/objstore/gcs/gcs.go @@ -54,7 +54,7 @@ func NewBucket(ctx context.Context, logger log.Logger, conf []byte, component st // If ServiceAccount is provided, use them in GCS client, otherwise fallback to Google default logic. if gc.ServiceAccount != "" { - credentials, err := google.CredentialsFromJSON(ctx, []byte(gc.ServiceAccount)) + credentials, err := google.CredentialsFromJSON(ctx, []byte(gc.ServiceAccount), storage.ScopeFullControl) if err != nil { return nil, errors.Wrap(err, "failed to create credentials from JSON") }