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

Change Cloud Bigtable name -> id to clarify its meaning #1673

Closed
mbrukman opened this issue Jun 19, 2018 · 2 comments
Closed

Change Cloud Bigtable name -> id to clarify its meaning #1673

mbrukman opened this issue Jun 19, 2018 · 2 comments

Comments

@mbrukman
Copy link
Contributor

In the Bigtable docs, an instance is identified by the parameter name but a cluster is identified by cluster_id:

resource "google_bigtable_instance" "instance" {
  name         = "tf-instance"
  cluster_id   = "tf-instance-cluster"
  zone         = "us-central1-b"
  num_nodes    = 3
  storage_type = "HDD"
}

Later on, the optional parameter display_name for an instance is also discussed, which defaults to name if not specified.

However, what is called name for an instance should actually be an instance id since it is a unique identifier, with restrictions (e.g., no spaces, all lowercase, globally unique in the project, etc.), and the display_name is the human-readable string that does not. When they're called name and display_name, that is confusing.

Note that this would be a breaking change, so it would be best coupled with a fix for issue #1672 (also a breaking change).

@emilymye
Copy link
Contributor

Sadly, we can't use "id" as a parameter in Terraform schemas as it is reserved for the system.

It'd be possible to use instance_id instead of name but that seems fairly redundant (given the resource name already has instance). Also, pretty much all resources in Terraform (not just this provider) use name instead of id across the board. The only exceptions tends to be when "name" is being used/reserved by GCP, and I'd wouldn't be surprised if changing name to instance_id would actually be more confusing to users.

@ghost
Copy link

ghost commented Nov 17, 2018

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 👉 [email protected]. Thanks!

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

No branches or pull requests

2 participants