terraform-google-modules/cloud-foundation-training

'fish' shell required me to set GOOGLE_APPLICATION_CREDENTIALS env var

deathstarjanitor opened this issue · 1 comments

In executing module 1, I was unable to execute terraform init with the following

smieszny@penguin ~/g/c/01-Getting-Started> terraform init

Initializing the backend...

Error: storage.NewClient() failed: dialing: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

I solved this by running

export GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_CLOUD_KEYFILE_JSON

Hey @adamthetownkrier, thanks for opening and apologies for the delay. I'll make a note to export the extra variable, and also guide users to using application default credentials.