projectIdEnvironmentVariableOptions top-level constant
A set of standard environment variables that are likely to represent the current Google Cloud project ID.
For context, see:
- https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts
- https://cloud.google.com/functions/docs/env-var
Note: these are ordered starting from the most current/canonical to least. (At least as could be determined at the time of writing.)
Implementation
const projectIdEnvironmentVariableOptions = {
projectIdEnvironmentVariable,
'GCP_PROJECT',
'GCLOUD_PROJECT',
'CLOUDSDK_CORE_PROJECT',
};