Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Stop reading Cloud SDK's configuration to obtain the project ID #146

@theacodes

Description

@theacodes

Instead, we should subprocess out to gcloud config config-helper --format json

Example output:

{
  "configuration": {
    "active_configuration": "default",
    "properties": {
      "core": {
        "account": "[ELIDED]",
        "disable_usage_reporting": "False",
        "project": "[ELIDED]"
      }
    }
  },
  "credential": {
    "access_token": "[ELIDED]",
    "token_expiry": "2017-03-23T23:09:49Z"
  },
  "sentinels": {
    "config_sentinel": "/Users/jonwayne/.config/gcloud/config_sentinel"
  }
}

Note: we should not use the auth token provided here at all. We should keep our existing logic of reading ~/.config/gcloud/application_default_credentials.json because those credentials are populated exclusively by gcloud auth application-default login and intended for Application Default Credentials.

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions