Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add organization-id as an auto-setter #1400

Open
morgante opened this issue Jan 28, 2021 · 2 comments
Open

Add organization-id as an auto-setter #1400

morgante opened this issue Jan 28, 2021 · 2 comments
Labels
area/hydrate customer deep engagement enhancement New feature or request p2 triaged Issue has been triaged by adding an `area/` label

Comments

@morgante
Copy link
Contributor

Packages using org-level functionality often depend on knowing the organization ID. We should add organization ID as an autosetter (similar to project ID), which can be retrieved from the current gcloud context.

The org ID for the active project can be retrieved with this command: gcloud projects get-ancestors $(gcloud config get-value core/project) --format='get(id)' | tail -1

Suggested name: gcloud.core.organization-id

@mikebz
Copy link
Contributor

mikebz commented Jan 28, 2021

I am curious about these things being auto-setters. Seems like this is a GCP specific feature and as such might be best reserved for functions that a GCP specific functions rather than something being built into kpt core? @frankfarzan

@mikebz mikebz added customer deep engagement triaged Issue has been triaged by adding an `area/` label labels Jan 28, 2021
@morgante
Copy link
Contributor Author

Two challenges with doing them as functions:

  1. Functions inside a container don't have access to the gcloud environment.
  2. Functions would need to be manually invoked, so it's not automatic/zero-friction

That being said, I think it is worth thinking about how autosetters could be done more extensibly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hydrate customer deep engagement enhancement New feature or request p2 triaged Issue has been triaged by adding an `area/` label
Projects
None yet
Development

No branches or pull requests

2 participants