Skip to content

Commit 2a7c09d

Browse files
committed
Use the OAuth scope that is required for storage.objects.update.
1 parent b5c164a commit 2a7c09d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/remote-state/gcs/backend.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ func (b *gcsBackend) configure(ctx context.Context) error {
147147
conf := jwt.Config{
148148
Email: account.ClientEmail,
149149
PrivateKey: []byte(account.PrivateKey),
150-
Scopes: []string{storage.ScopeReadWrite},
150+
Scopes: []string{storage.ScopeFullControl},
151151
TokenURL: "https://accounts.google.com/o/oauth2/token",
152152
}
153153

154154
opts = append(opts, option.WithHTTPClient(conf.Client(ctx)))
155155
} else {
156-
opts = append(opts, option.WithScopes(storage.ScopeReadWrite))
156+
opts = append(opts, option.WithScopes(storage.ScopeFullControl))
157157
}
158158

159159
opts = append(opts, option.WithUserAgent(httpclient.UserAgentString()))

0 commit comments

Comments
 (0)