Skip to main content

Google Cloud

You can define a Google Cloud credential in several ways.

  • Supplying the path to a credential json file
  • Putting the json credential inline in the configs
  • Manually defining the required attributes

Provide a credential via file (path to a JSON key), json (inline JSON), or by setting the individual fields (type, client_email, private_key_id, private_key, auth_uri, token_uri, project_id, location_id). The full field list is in the GoogleCredential reference.

Note consider using the managed variable store or your own secrets management for the private key.

JSON credential file path example

Google Cloud credential file example
global:
google_credentials:
main:
file: /path/to/credentials.json

JSON credential inline example

Google Cloud credential inline json example
global:
google_credentials:
main:
json: |
{
"type": "service_account",
"project_id": "someproject",
"private_key_id": "123456",
"private_key": "-----BEGIN BLAH KEY-----\nMaaaaaaBADANBgkqhkiG9w0BAQEFAASCBKYwggSEW8+Basas==\n-----END BLAH KEY-----\n",
"client_email": "[email protected]",
"client_id": "100876872413513798695",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/someproject%40someproject.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}