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

Blocks of type "secondary_boot_disks" are not expected here #1952

Closed
alvicsam opened this issue May 23, 2024 · 2 comments
Closed

Blocks of type "secondary_boot_disks" are not expected here #1952

alvicsam opened this issue May 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@alvicsam
Copy link
Contributor

TL;DR

The change introduced in #1946 breaks tf plan for a simple GKE cluster.

Expected behavior

Simple GKE cluster after tf plan should not require secondary_boot_disks

Observed behavior

➜  base git:(as-tf-mod) ✗ tf plan
╷
│ Error: Unsupported block type
│
│   on .terraform/modules/gke/cluster.tf line 613, in resource "google_container_node_pool" "pools":
│  613:     dynamic "secondary_boot_disks" {
│
│ Blocks of type "secondary_boot_disks" are not expected here.

Terraform Configuration

# GKE

data "google_client_config" "default" {}

provider "kubernetes" {
  host                   = "https://${module.gke.endpoint}"
  token                  = data.google_client_config.default.access_token
  cluster_ca_certificate = base64decode(module.gke.ca_certificate)
}

module "gke" {
  source = "github.com/terraform-google-kubernetes-engine/terraform-google-kubernetes-engine?ref=e573cedee0a82517410f9d607ce69be7189124ca"

  project_id                = var.project_id
  name                      = "org-name-gke"
  regional                  = true
  region                    = var.region
  zones                     = ["europe-west1-b"]
  network                   = "org-name"
  subnetwork                = "org-name-europe-west1"
  ip_range_pods             = "org-name-pods-europe-west1"
  ip_range_services         = "org-name-services-europe-west1"
  create_service_account    = true
  grant_registry_access     = true
  default_max_pods_per_node = 20
  remove_default_node_pool  = true
  deletion_protection       = false
  datapath_provider         = "ADVANCED_DATAPATH" # dataplane v2

  node_pools = [
    {
      name              = "application-pool"
      machine_type      = "e2-standard-2"
      node_count        = 2
      autoscaling       = false
      local_ssd_count   = 0
      disk_size_gb      = 50
      disk_type         = "pd-standard"
      image_type        = "COS_CONTAINERD"
      auto_repair       = true
      auto_upgrade      = true
      preemptible       = false
      max_pods_per_node = 70
    },
    {
      name         = "application-pool2"
      machine_type = "n2-standard-8"
      min_count    = 0
      max_count    = 50
      autoscaling  = true
      local_ssd_count   = 0
      disk_size_gb      = 500
      disk_type         = "pd-ssd"
      image_type        = "COS_CONTAINERD"
      auto_repair       = true
      auto_upgrade      = true
      preemptible       = true
      max_pods_per_node = 20
    },
    {
      name         = "application-pool-ssd"
      machine_type = "n2-standard-8"
      min_count    = 0
      max_count    = 50
      autoscaling  = true
      local_ssd_ephemeral_storage_count = 2
      disk_size_gb                      = 500
      disk_type                         = "pd-ssd"
      image_type                        = "COS_CONTAINERD"
      auto_repair                       = true
      auto_upgrade                      = true
      preemptible                       = true
      max_pods_per_node                 = 20
      min_cpu_platform                  = "Intel Ice Lake"
      threads_per_core                  = 1
      secondary_boot_disk               = ""
    },
  ]

}

Terraform Version

Terraform v1.7.4

Additional information

cc @yorik

@alvicsam alvicsam added the bug Something isn't working label May 23, 2024
@yorik
Copy link
Contributor

yorik commented May 23, 2024

@alvicsam I think you have to upgrade hashicorp/google and/or hashicorp/google-beta providers to version at least 5.29.0.

@alvicsam
Copy link
Contributor Author

@yorik yep, that helped, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants