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

[Terraform]: google_bigtable_instance add back validation to num_nodes. #679

Merged

Conversation

rileykarson
Copy link
Member

@rileykarson rileykarson commented Nov 2, 2018

Fixes hashicorp/terraform-provider-google#2400

Wow! This one is weird.

Given a config like this (we're implicitly making a PRODUCTION instance with a TF default):

resource "google_bigtable_instance" "instance" {
  name = "foo"

  cluster {
    cluster_id   = "foo"
    zone         = "${local.zone}"
    num_nodes    = {{NUMBER}}
    storage_type = "SSD"
  }
}
  • NUMBER = 0: Fails saying that a PRODUCTION instance needs some number of nodes specified
  • NUMBER = 2: Fails saying that you need at least 3 nodes
  • NUMBER = 3: Works as expected

All of these make sense, but then...

  • NUMBER = 1: Creates a DEVELOPMENT instance (in a request where we explicitly requested a PRODUCTION instance!) which has no num_nodes because DEVELOPMENT instances don't have num_nodes.

This validation means num_nodes can't be specified as 0, which is technically a breaking change but leaving it unspecified works fine.


[all]

[terraform]

google_bigtable_instance add back validation to num_nodes.

[terraform-beta]

[ansible]

[inspec]

@modular-magician
Copy link
Collaborator

I am a robot that works on MagicModules PRs!

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

@modular-magician
Copy link
Collaborator

I am (still) a robot that works on MagicModules PRs!

I just wanted to let you know that your changes (as of commit 5ef7fb8) have been included in your existing downstream PRs.

rileykarson and others added 3 commits November 5, 2018 16:49
Tracked submodules are build/terraform-beta build/terraform build/ansible build/inspec.
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.

4 participants