Skip to content

Commit

Permalink
Adding scope ScopeReadWrite for uploading file for GCS Bucket
Browse files Browse the repository at this point in the history
Signed-off-by: Chanukya Y <[email protected]>
  • Loading branch information
chanukya-yekollu-exa committed Feb 4, 2025
1 parent 5af88e5 commit 1c0f8e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion outputs/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1c0f8e9

Please sign in to comment.