Skip to content

Instantly share code, notes, and snippets.

@clintcolding
Created December 6, 2022 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clintcolding/13e43dc71e96e03dfe77c9a3b9d5b01d to your computer and use it in GitHub Desktop.
Save clintcolding/13e43dc71e96e03dfe77c9a3b9d5b01d to your computer and use it in GitHub Desktop.
Creating GOOGLE_CREDENTIAL for Terraform Cloud

Create GOOGLE_CREDENTIALS

  1. Create a service account within the GCP project (terraform-svc).
  2. Create a new JSON key for the service account and save the file.
  3. Run the following command on the JSON file to format it correctly for TFC. cat key.json | tr -s '\n' ' '
  4. Copy the output of step 3 into the GOOGLE_CREDENTIALS variable in the TFC workspace.
  5. Make sure to mark the variable as sensitive!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment