Skip to content

feat(key): add correctly scoped environment variables for setting GCloud key#2

Merged
skevetter merged 1 commit intoskevetter:mainfrom
dubinsky:correctly-scoped-environment-variables-for-setting-GCloud-key
Jan 9, 2026
Merged

feat(key): add correctly scoped environment variables for setting GCloud key#2
skevetter merged 1 commit intoskevetter:mainfrom
dubinsky:correctly-scoped-environment-variables-for-setting-GCloud-key

Conversation

@dubinsky
Copy link
Copy Markdown

@dubinsky dubinsky commented Jan 9, 2026

Currently, there are two ways to communicate GCloud key to the provider:

  1. Set GOOGLE_APPLICATION_CREDENTIALS environment variable to point to the file with the JSON key. This is too generic: it is likely that the key for DevPod belongs to a dedicated service account, whereas other GCloud operations that the developer performs from the same directory use different keys (e.g., Cloud Run with a different service account etc.). We need an ability to communicate the key in a DevPod-specific way.

  2. Set GCLOUD_JSON_AUTH environment variable to the actual JSON key. Although this variable is DevPod-specific, this fact is not obvious from its name, which is not scoped. We need an ability to communicate the key in a clearly DevPod-specific way :)

This pull request adds handling for two new environment variables, with names clearly scoped for DevPod:

  1. DEVPOD_PROVIDER_GCLOUD_KEY_FILE is a correctly scoped synonym for the GOOGLE_APPLICATION_CREDENTIALS (which is set from it if it is set :)); it points to the file with the JSON key.

  2. DEVPOD_PROVIDER_GCLOUD_KEY is a correctly scoped synonym for the GCLOUD_JSON_AUTH; it contains the actual JSON key.

…oud key

Currently, there are two ways to communicate GCloud key to the provider:

1. Set `GOOGLE_APPLICATION_CREDENTIALS` environment variable to point to the file with the JSON key. This is too generic: it is likely that the key for DevPod belongs to a dedicated service account, whereas other GCloud operations that the developer performs from the same directory use different keys (e.g., Cloud Run with a different service account etc.).

We need an ability to communicate the key in a DevPod-specific way.

2. Set `GCLOUD_JSON_AUTH` environment variable to the actual JSON key. Although this variable *is* DevPod-specific, this fact is not obvious from its name, which is not scoped.

We need an ability to communicate the key in a *clearly* DevPod-specific way :)

This pull request adds handling for two new environment variables, with names clearly scoped for DevPod:

1. `DEVPOD_PROVIDER_GCLOUD_KEY_FILE` is a correctly scoped synonym for the `GOOGLE_APPLICATION_CREDENTIALS` (which is set from it if it is set :)); it points to the file with the JSON key.

2. `DEVPOD_PROVIDER_GCLOUD_KEY` is a correctly scoped synonym for the `GCLOUD_JSON_AUTH`; it contains the actual JSON key.
@dubinsky dubinsky force-pushed the correctly-scoped-environment-variables-for-setting-GCloud-key branch from 967b79a to 6b4f7e0 Compare January 9, 2026 17:42
@dubinsky
Copy link
Copy Markdown
Author

dubinsky commented Jan 9, 2026

@skevetter please take a look ;)

@skevetter skevetter merged commit 2fd105e into skevetter:main Jan 9, 2026
@dubinsky
Copy link
Copy Markdown
Author

dubinsky commented Jan 9, 2026

Thank you!

@dubinsky dubinsky deleted the correctly-scoped-environment-variables-for-setting-GCloud-key branch January 9, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants