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

Add support for Google Cloud Bigtable. #177

Merged
merged 15 commits into from
Jul 11, 2017
Merged

Add support for Google Cloud Bigtable. #177

merged 15 commits into from
Jul 11, 2017

Conversation

rileykarson
Copy link
Collaborator

Merge the bigtable-support branch into master.

Add support for two new resources:

  • google_bigtable_instance - A container for a single Bigtable cluster.
  • google_bigtable_table - A Bigtable table contained within an instance.

@danawillow
Copy link
Contributor

Assuming nothing's changed since the other reviews, 👍

Copy link
Contributor

@selmanj selmanj left a comment

Choose a reason for hiding this comment

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

Minor comments but overall I approve

"num_nodes": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

This value can't be updated? Seems like a natural thing to want to adjust later

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can't update it with the client as-is, or even read it for that matter. When the client supports updating this value, we can remove ForceNew.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK

TokenSource oauth2.TokenSource
}

func (s *BigtableClientFactory) NewInstanceAdminClient(project string) (*bigtable.InstanceAdminClient, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you remove the pointer on the receiver in the signature (e.g.

func (s BigtableClientFactory) NewInstanceAdminClient(project string) (*bigtable.InstanceAdminClient, error) {

), then this function is much more explicit that it is immutable (and is therefore thread safe, etc)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

return bigtable.NewInstanceAdminClient(context.Background(), project, option.WithTokenSource(s.TokenSource), option.WithUserAgent(s.UserAgent))
}

func (s *BigtableClientFactory) NewAdminClient(project, instance string) (*bigtable.AdminClient, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

return fmt.Errorf("Error starting instance admin client. %s", err)
}

defer c.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think golang tooling gets mad if you don't check the return result here in case it returns an error

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I haven't had Gogland get mad at me, and I don't think we can do anything useful with an error from this - any interesting errors would have come from operations we performed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah agree, the only thing we can do is log it but if we're closing it I doubt we're interested in the log message 👍

@selmanj selmanj merged commit 95e72d5 into master Jul 11, 2017
@rileykarson rileykarson deleted the bigtable-support branch July 14, 2017 20:21
negz pushed a commit to negz/terraform-provider-google that referenced this pull request Oct 17, 2017
…pport

Add support for Google Cloud Bigtable.
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
…pport

Add support for Google Cloud Bigtable.
@ghost
Copy link

ghost commented Mar 31, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 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.

3 participants