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

Read more default envvars for GCP #6114

Merged
merged 1 commit into from
Apr 11, 2016
Merged

Read more default envvars for GCP #6114

merged 1 commit into from
Apr 11, 2016

Conversation

sethvargo
Copy link
Contributor

}

if v := os.Getenv("GOOGLE_REGION"); v != "us-central1" {
t.Fatal("GOOGLE_REGION must be set to us-central1 for acceptance tests")
projs := []string{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between projs & creds? can't we set a global constant for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @stack72

  • creds - places to look for credentials json
  • projs - places to look for project
  • regs - places to look for regions

We could make this a constant and share it between the provider and provider_test, but that wasn't a pattern I saw elsewhere in the codebase and didn't want to introduce a new paradigm. This is just the test file searching for the place to pull in creds from, and it arguably could remain unchanged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense not to break the formulae :)

can also be specified with the `GOOGLE_CREDENTIALS` or `GOOGLE_CLOUD_KEYFILE_JSON`
shell environment variable, containing the contents of the credentials file.
can also be specified using any of the following environment variables
(listed in order of precedence):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you point to the docs where you found these requirements here? It will make it clearer why Terraform allows you to configure your credentials so many different ways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, darn, oh well. I guess adding those would just make it more confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, (other cloud) had this problem and eventually someone made an authoritative decision and said "these are the envvars, everything else is wrong!" 😄

@lwander
Copy link
Contributor

lwander commented Apr 11, 2016

LGTM after comment

@sethvargo sethvargo merged commit 95c7fd7 into master Apr 11, 2016
@sethvargo sethvargo deleted the sethvargo/gce_envvars branch April 11, 2016 17:17
@ghost
Copy link

ghost commented Apr 26, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align Terraform environment variables with GCE defaults
3 participants