Skip to content

Commit

Permalink
Export Spanner credential JSON for datastore
Browse files Browse the repository at this point in the history
Closes authzed#1941

Signed-off-by: Lex Cao <[email protected]>
  • Loading branch information
lexcao committed Jun 17, 2024
1 parent b3acf2f commit 020e0e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cmd/datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ type Config struct {

// Spanner
SpannerCredentialsFile string `debugmap:"visible"`
SpannerCredentialsJSON []byte `debugmap:"sensitive"`
SpannerEmulatorHost string `debugmap:"visible"`
SpannerMinSessions uint64 `debugmap:"visible"`
SpannerMaxSessions uint64 `debugmap:"visible"`
Expand Down Expand Up @@ -429,6 +430,7 @@ func newSpannerDatastore(ctx context.Context, opts Config) (datastore.Datastore,
spanner.RevisionQuantization(opts.RevisionQuantization),
spanner.MaxRevisionStalenessPercent(opts.MaxRevisionStalenessPercent),
spanner.CredentialsFile(opts.SpannerCredentialsFile),
spanner.CredentialsJSON(opts.SpannerCredentialsJSON),
spanner.WatchBufferLength(opts.WatchBufferLength),
spanner.WatchBufferWriteTimeout(opts.WatchBufferWriteTimeout),
spanner.EmulatorHost(opts.SpannerEmulatorHost),
Expand Down
16 changes: 16 additions & 0 deletions pkg/cmd/datastore/zz_generated.options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 020e0e7

Please sign in to comment.