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

Document that GKE master_auth key is an array #617

Merged
merged 5 commits into from
Nov 2, 2017

Conversation

aeneasr
Copy link

@aeneasr aeneasr commented Oct 22, 2017

This resolves hashicorp/terraform#16417 and is a follow up to hashicorp/terraform#14073

@danawillow
Copy link
Contributor

Hey @arekkas, thanks for the PR!

I took a look to see how we handle this in other resources, and found the docs for compute instance: https://www.terraform.io/docs/providers/google/r/compute_instance.html#attributes-reference, namely:

  • network_interface.0.address - The internal ip address of the instance, either manually or dynamically assigned.

  • network_interface.0.access_config.0.assigned_nat_ip - If the instance has an access config, either the given external ip (in the nat_ip field) or the ephemeral (generated) ip (if you didn't provide one).
    (etc)

If the docs for container cluster had been in a format like that, do you think that would have been clearer? I think the docs you've proposed are fine, but I worry they're almost too detailed. Let me know what you think!

@aeneasr
Copy link
Author

aeneasr commented Nov 1, 2017

I think it depends on whether or not master_auth is populated with more than one array entry. I'm not very savvy on GKE internals/API payloads so I don't really know if and when that array has more than one entry. Depending on that I would either try to keep it a bit verbose (maybe even explain what those other array elements might be), or redact it a bit to make it more streamlined.

@aeneasr
Copy link
Author

aeneasr commented Nov 1, 2017

One thing though, in my experience

I worry they're almost too detailed

does almost never apply to docs! :) Someone is always confused by instructions, having examples and a bit of explanation usually prevents that, at least in my experience.

@danawillow
Copy link
Contributor

This line: https://github.com/terraform-providers/terraform-provider-google/blob/master/google/resource_container_cluster.go#L189 guarantees there will never be more than one entry.

And sure, too detailed might not have been the best phrasing. Too generalized? I'm fine with examples, but I personally think that:
master_auth.0.client_certificate is a bit more to-the-point than master_auth.<key>.client_certificate

@aeneasr
Copy link
Author

aeneasr commented Nov 2, 2017

Ok, then it makes sense to shorten this down!

@aeneasr
Copy link
Author

aeneasr commented Nov 2, 2017

I moved the example to the top and simply added a 0 key to the affected keys, does that look better now?

@danawillow
Copy link
Contributor

Looks good, thanks @arekkas!

@danawillow danawillow merged commit 8cf605f into hashicorp:master Nov 2, 2017
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
* Document that GKE master_auth key is an array

This resolves hashicorp/terraform#16417 and is a follow up to hashicorp/terraform#14073

* Update container_cluster.html.markdown

* Update container_cluster.html.markdown

* Update container_cluster.html.markdown
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
<!-- This change is generated by MagicModules. -->
Original Author: @rileykarson
@ghost
Copy link

ghost commented Mar 30, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

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

Successfully merging this pull request may close these issues.

Google Container Cluster documentation on master_auth output variables is inaccurate
3 participants