I'm creating a shell script to handle automation for some of our workflows, This workflow include accessing Google Buckets via Apache Beam GCP. I'm using a .json file with my service account, in which situations do i need to use:
gcloud auth activate-service-account --key-file myfile.json
vs
export GOOGLE_APPLICATION_CREDENTIALS=myfile.json