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

Maintenance exclusion is not removed from google_container_cluster #8566

Closed
asodja opened this issue Feb 26, 2021 · 1 comment · Fixed by GoogleCloudPlatform/magic-modules#4541, #8589 or hashicorp/terraform-provider-google-beta#3014
Assignees
Labels

Comments

@asodja
Copy link

asodja commented Feb 26, 2021

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 v0.14.6

  • provider registry.terraform.io/hashicorp/google v3.58.0
  • provider registry.terraform.io/hashicorp/google-beta v3.58.0
  • provider registry.terraform.io/hashicorp/time v0.5.0

Affected Resource(s)

  • google_container_cluster

Terraform Configuration Files

resource "google_container_cluster" "gcp_gke_cluster" {
  name = "test-cluster"
  project = "your_project"
  location = "us-central1"
  initial_node_count = 1
  release_channel {
    channel = "STABLE"
  }
  maintenance_policy {
    recurring_window {
      start_time = "2019-01-01T00:00:00Z"
      end_time = "2019-01-02T00:00:00Z"
      recurrence = "FREQ=DAILY"
    }
    maintenance_exclusion {
      exclusion_name = "batch job"
      start_time = "2019-01-01T00:00:00Z"
      end_time = "2019-01-02T00:00:00Z"
    }
    maintenance_exclusion {
      exclusion_name = "holiday data load"
      start_time = "2019-05-01T00:00:00Z"
      end_time = "2019-05-02T00:00:00Z"
    }
  }
}

Expected Behavior

When removing some already defined maintenance exclusion it should be removed from cluster configuration. GKE resource should be updated.

Actual Behavior

Maintenance exclusions is NOT removed from cluster configuration. GKE resource is not updated. So we actually ended with 4 exclusions on one of clusters, even though only 3 are allowed

Steps to Reproduce

  1. terraform apply given configuration
  2. Remove one of exclusions, for example "batch job"
  3. terraform apply changed configuration, terraform apply shows diff where it will remove exclusion
  4. Check Cluster in GCP console, exclusion is still there
  5. terraform apply changed configuration again, terraform apply shows diff again with same change

Workaround

  1. Remove exclusion via GCP console by hand
@ghost
Copy link

ghost commented Apr 2, 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 Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.