From fa4edef9dd59b7abc234a053ea7100492431fdbf Mon Sep 17 00:00:00 2001 From: Chanukya Y Date: Tue, 4 Feb 2025 14:29:35 +0530 Subject: [PATCH] Adding scope ScopeReadWrite for uploading file for GCS Bucket --- outputs/gcp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs/gcp.go b/outputs/gcp.go index 1f4b188f1..da25a1417 100644 --- a/outputs/gcp.go +++ b/outputs/gcp.go @@ -63,7 +63,7 @@ func NewGCPClient(config *types.Configuration, stats *types.Statistics, promStat } if config.GCP.Storage.Bucket != "" { - credentials, err := google.CredentialsFromJSON(context.Background(), []byte(googleCredentialsData)) + credentials, err := google.CredentialsFromJSON(context.Background(), []byte(googleCredentialsData), storage.ScopeReadWrite) if err != nil { utils.Log(utils.ErrorLvl, "GCP PubSub", "Error while loading GCS Credentials") return nil, errors.New("error while loading GCP Credentials")