To setup Google Cloud for use with Terraform, create a Google Cloud project using the Google Console.

Then, I create a Google Cloud Service Account. After creating the account with the appropriate role, I create the service account key and download and save the private key data in JSON format.

Once you have the service account key, then you can export an environment variable like GOOGLE_CREDENTIALS with the path to the JSON file. See the Google Cloud Provider Terraform documentation for more information.

Finally, you can create and run your terraform commands which will use the service account to create your Google Cloud resources.