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

Provider crashes updating existing gke cluster by adding maintenance_exclusion #8112

Closed
msgongora opened this issue Jan 5, 2021 · 3 comments · Fixed by GoogleCloudPlatform/magic-modules#4372, hashicorp/terraform-provider-google-beta#2839 or #8126
Assignees

Comments

@msgongora
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

$ terraform-0.13 -v
Terraform v0.13.5
+ provider registry.terraform.io/hashicorp/google v3.51.0

Affected Resource(s)

  • google_container_cluster

Terraform Configuration Files

Cluster creation runs succesful

terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "3.51.0"
    }
  }
  required_version = ">= 0.13"
}

locals {
  manifest_path      = "${path.module}/manifests"
  project            = "__REDACTED__"
  pods_range         = format("%s-use1-1-pods", local.project)
  services_range     = format("%s-use1-1-services", local.project)
  regional           = true
  name               = "test0002"
  region             = "us-east1"
  zone               = "us-east1-c"
  primary_network    = format("%s-network", local.project)
  primary_subnetwork = format("%s-use1", local.project)
}

resource "google_container_cluster" "primary" {
  name       = local.name
  location   = local.zone
  project    = local.project
  network    = local.primary_network
  subnetwork = local.primary_subnetwork

  initial_node_count = 1
  release_channel {
    channel = "STABLE"
  }

  maintenance_policy {
    daily_maintenance_window {
      start_time = "07:00"
    }
  }
}

Cluster update crashes by adding maintenance_exclusion

terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "3.51.0"
    }
  }
  required_version = ">= 0.13"
}

locals {
  manifest_path      = "${path.module}/manifests"
  project            = "__REDACTED__"
  pods_range         = format("%s-use1-1-pods", local.project)
  services_range     = format("%s-use1-1-services", local.project)
  regional           = true
  name               = "test0002"
  region             = "us-east1"
  zone               = "us-east1-c"
  primary_network    = format("%s-network", local.project)
  primary_subnetwork = format("%s-use1", local.project)
}

resource "google_container_cluster" "primary" {
  name       = local.name
  location   = local.zone
  project    = local.project
  network    = local.primary_network
  subnetwork = local.primary_subnetwork

  initial_node_count = 1
  release_channel {
    channel = "STABLE"
  }

  maintenance_policy {

    daily_maintenance_window {
      start_time = "07:00"
    }

    maintenance_exclusion {
      exclusion_name = "Touchdown"
      start_time     = "2021-02-07T05:00:00Z"
      end_time       = "2021-02-10T05:00:00Z"
    }
  }
}

Debug Output

output.log

Panic Output

crash.log

Expected Behavior

Cluster should be updated with a new Maintenance Exclusion: Touchdown

Actual Behavior

The cluster update crashes with err="rpc error: code = Unavailable desc = transport is closing"

Steps to Reproduce

  1. terraform apply
  2. Edit block maintenance_policy by adding blockmaintenance_exclusion. Cluster was created with maintenance_policy but without exclusions.
  3. terraform apply
@ghost ghost added bug labels Jan 5, 2021
@edwardmedia edwardmedia self-assigned this Jan 5, 2021
@edwardmedia
Copy link
Contributor

I can repro this issue

@msgongora
Copy link
Author

I have submitted a PR, both providers were tested on my end

@ghost
Copy link

ghost commented Feb 6, 2021

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 as resolved and limited conversation to collaborators Feb 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.