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

Verbose method of setting Project and Region variables #1

Open
laughingbiscuit opened this issue Feb 18, 2020 · 1 comment
Open

Verbose method of setting Project and Region variables #1

laughingbiscuit opened this issue Feb 18, 2020 · 1 comment

Comments

@laughingbiscuit
Copy link
Collaborator

laughingbiscuit commented Feb 18, 2020

Hi Yuriy,

You can simplify ./bin/ahr-env. You currently check the variables $PROJECT and $REGION and then use gcloud config set ...

An easier way is to use the default $CLOUDSDK_COMPUTE_REGION and $CLOUDSDK_CORE_PROJECT . This allows you to skip the config set commands as environment variables have higher precendence.

Simple example: https://medium.com/@nieldw/using-environment-variables-to-set-gcloud-config-9eb2da7666e7

@laughingbiscuit
Copy link
Collaborator Author

in fact... you could just run gcloud init to replace all of the project/region/auth logic and error handling

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

No branches or pull requests

1 participant