terraform-google-kubernetes-engine icon indicating copy to clipboard operation
terraform-google-kubernetes-engine copied to clipboard

Use with dual-stack VPC causes cluster recreation

Open kliu47 opened this issue 1 year ago • 1 comments

TL;DR

When using a dualstack VPC, cluster tries to be re-created each run due to mismatch in enable_l4_ilb_subsetting

image

Expected behavior

Cluster would not be recreated

Observed behavior

Terraform requires the cluster to be recreated

Terraform Configuration

module "gke" {
  source                          = "terraform-google-modules/kubernetes-engine/google//modules/beta-autopilot-private-cluster"
  version                         = "30.0.0"
  project_id                      = var.project_id
  name                            = "cluster-${var.environment}-test"
  region                          = var.region
  release_channel                 = "RAPID"
  network_project_id              = var.network_project
  network                         = var.network
  subnetwork                      = var.subnetwork
  ip_range_pods                   = var.ip_range_pods
  ip_range_services               = var.ip_range_svcs
  horizontal_pod_autoscaling      = true
  enable_vertical_pod_autoscaling = true
  enable_private_endpoint         = false
  enable_private_nodes            = true
  master_ipv4_cidr_block          = var.master_ipv4_cidr_block
  master_authorized_networks      = local.master_authorized_networks
  deletion_protection             = false
  gateway_api_channel             = "CHANNEL_STANDARD"
  network_tags = [
    "allow-gcp-load-balancer-health-check",
  ]
}

Terraform Version

1.6.6

Additional information

This issue might not be just limited to the module, but the core google_container_cluster itself

kliu47 avatar Feb 01 '24 22:02 kliu47

It is a module problem. This happens with the root module as well as the beta-autopilot-private-cluster and beta-autopilot-public-cluster modules, but not the beta-public-cluster module, as that can set enable_l4_ilb_subsetting with a variable.

Rycieos avatar Feb 09 '24 19:02 Rycieos

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Apr 09 '24 23:04 github-actions[bot]