Skip to content

Maintenance exclusion is not removed from google_container_cluster #8566

@asodja

Description

@asodja

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions