WHAT
In some cases, (int my project github actions ). it is not safe to export the service account key files.
and since the use case is kind of temporally , so it is easier to use the access-token
gcloud print-access-token
and in spanner client using WithTokenSource option
options = append(options, option.WithTokenSource(ts))
WHY
In my cases ,update schema is short lived behaviour , and mostly happened in git hub actions . right now I have to use the key file , which have the risk to leak . using an access token in this scenario is much safer . and easy to maintain
Thanks
WHAT
In some cases, (int my project github actions ). it is not safe to export the service account key files.
and since the use case is kind of temporally , so it is easier to use the access-token
gcloud print-access-token
and in spanner client using WithTokenSource option
options = append(options, option.WithTokenSource(ts))
WHY
In my cases ,update schema is short lived behaviour , and mostly happened in git hub actions . right now I have to use the key file , which have the risk to leak . using an access token in this scenario is much safer . and easy to maintain
Thanks