gcloud config set project [MY_PROJECT_ID]
gcloud auth application-default login
API client libraries now automatically pick up the created credentials. You need to run the command only once per local user environment. (Note: This approach is suitable for local development; for production use, you’ll want to use a different method for auth.)
gcloud spanner instances create test-instance --config=regional-us-central1 --description="Test Instance" --nodes=1
gcloud spanner databases create test-db --instance=test-instance
That’s it — you now have your very own Cloud Spanner database. Again, your GCP credit should allow you to run it cost-free for a couple weeks. From there, you can download sample data and interact with it using the language of your choice.