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

Refresh Google provider configuration reference page #1559

Merged

Conversation

rileykarson
Copy link
Member

I had some spare time while GKE runs were going to test omitted blocks, and I saw that our configuration reference was a bit of a mess compared to Azure; we spend a lot of time documenting every single env var you could use and it's a little intimidating; instead, add a quick reference for "what are the fields on the provider block" and a full reference to dig into the specifics of each field and what vars can be used etc.

If I misspoke about anything related to authentication, please correct me! I'm around 70% confident I got it all right.

/cc @chrisst @paddycarver if either of you have feelings


[all]

[terraform]

[terraform-beta]

[ansible]

[inspec]

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
This PR seems not to have generated downstream PRs before, as of f9b2e77.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#547
depends: hashicorp/terraform-provider-google#3295

Copy link
Contributor

@chrisst chrisst left a comment

Choose a reason for hiding this comment

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

Good refresh! Couple small comments.

The `google` and `google-beta` provider blocks are used to configure default values for
your GCP project and location (`zone` and `region`), and add your credentials.

-> You can avoid using a provider block by using environment variables. Every
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be explicit about the inheritance path of specifying these values in environment vs provider vs resource. Even in the Full Reference section the language doesn't show which value will 'win' if duplicated. I think specifying the inheritance in one place (preferably up high) is valuable. Or maybe in the other Configuration Reference section.

Copy link
Member Author

@rileykarson rileykarson Mar 22, 2019

Choose a reason for hiding this comment

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

Breaking down one of the examples;

The default project to manage resources in. If another
project is specified on a resource, it will take precedence. Alternatively, this
can be specified using the specified using the GOOGLE_PROJECT environment
variable, or any of the following ordered by precedence.

The default project to manage resources in. If another project is specified on a resource, it will take precedence.

clearly specifies the relationship between provider <-> resource

Alternatively, this can be specified using the specified using the GOOGLE_PROJECT environment variable, or any of the following ordered by precedence.

I think that the Alternatively, this can be specified... implies the relationship there- that explicit values take precendence -strongly enough, especially because it should be the default assumption of users. Do you think it's insufficient?

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 81867f6.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

rileykarson and others added 3 commits March 25, 2019 22:34
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
@modular-magician modular-magician merged commit 97b395e into GoogleCloudPlatform:master Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants