Skip to main content

Google Cloud Platform

There are many components within Expanso Edge which utilise Google Cloud Platform (GCP) services. You will find that each of these components require valid credentials.

When running Expanso Edge inside a Google Cloud environment that has a default service account, it can automatically retrieve the service account credentials to call Google Cloud APIs through a library called Application Default Credentials (ADC).

Otherwise, if your application runs outside Google Cloud environments that provide a default service account, you need to manually create one. Once you have a service account set up which has the required permissions, you can create a new Service Account Key and download it as a JSON file. Then all you need to do set the path to this JSON file in the GOOGLE_APPLICATION_CREDENTIALS environment variable.

Please refer to this document for details.

Passing credentials directly

Instead of the GOOGLE_APPLICATION_CREDENTIALS environment variable, GCP components also accept a credentials_json field, which takes the service account key JSON directly:

output:
gcp_cloud_storage:
bucket: my-bucket
path: data/${! uuid_v4() }.json
credentials_json: "${GCP_SA_KEY_JSON}"

Keep the key out of the pipeline config: reference it from an environment variable (as above) or a secret provider.