Skip to content

google-beta v4.11.0crashes on google_container_clusterΒ #11144

@adefemi171

Description

@adefemi171

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 v1.1.6
google-beta v4.11.0

Affected Resource(s)

*google_container_cluster

Terraform Configuration Files

resource "google_container_cluster" "this" {
  provider    = google-beta
  name        = var.cluster_name
  location    = var.region
  description = var.cluster_description

  master_auth {
    client_certificate_config {
      issue_client_certificate = var.issue_client_certificate
    }
  }

  addons_config {
    http_load_balancing {
      disabled = var.http_load_balancing
    }

    horizontal_pod_autoscaling {
      disabled = var.horizontal_pod_autoscaling
    }

    network_policy_config {
      disabled = var.network_policy
    }

    dns_cache_config {
      enabled = var.dns_cache_config
    }

    gce_persistent_disk_csi_driver_config {
      enabled = var.gce_persistent_disk_csi_driver_config
    }
  }

  network    = var.cluster_network
  subnetwork = var.cluster_subnetwork
  resource_labels = {
    environment = var.rl_environment
    application = var.rl_application
    state       = var.rl_state
  }
  network_policy {
    enabled = var.npol_enabled
  }
  ip_allocation_policy {
    cluster_secondary_range_name  = var.cluster_secondary_range_name
    services_secondary_range_name = var.services_secondary_range_name
  }

  dynamic "master_authorized_networks_config" {
    for_each = local.master_authorized_networks_config
    content {
      dynamic "cidr_blocks" {
        for_each = master_authorized_networks_config.value.cidr_blocks
        content {
          cidr_block   = lookup(cidr_blocks.value, "cidr_block", "")
          display_name = lookup(cidr_blocks.value, "display_name", "")
        }
      }
    }
  }

  cluster_autoscaling {
    enabled = var.cluster_autoscaling.enabled
    dynamic "auto_provisioning_defaults" {
      for_each = var.cluster_autoscaling.enabled ? [1] : []

      content {
        min_cpu_platform = var.min_cpu_platform
        service_account  = var.service_account
        oauth_scopes     = var.oauth_scopes
        image_type       = var.image_type
      }
    }
    dynamic "resource_limits" {
      for_each = local.autoscaling_resource_limits
      content {
        resource_type = lookup(resource_limits.value, "resource_type")
        minimum       = lookup(resource_limits.value, "minimum")
        maximum       = lookup(resource_limits.value, "maximum")
      }
    }
  }
  node_locations    = var.node_locations
  datapath_provider = var.datapath_provider
  authenticator_groups_config {
    security_group = var.security_group
  }
  private_cluster_config {
    enable_private_nodes    = var.enable_private_nodes
    enable_private_endpoint = var.enable_private_endpoint
    master_ipv4_cidr_block  = var.master_ipv4_cidr_block
  }
  database_encryption {
    state    = var.db_state
    key_name = var.db_key_name
  }
  enable_shielded_nodes = var.enable_shielded_nodes
  release_channel {
    channel = var.channel
  }
  workload_identity_config {
    workload_pool = var.workload_pool
  }

  notification_config {
    pubsub {
      enabled = var.ps_enabled
    }
  }
  default_max_pods_per_node = var.default_max_pods_per_node
  node_version              = var.node_version
  min_master_version        = var.min_master_version
  logging_config {
    enable_components = var.lg_enable_components
  }
  monitoring_config {
    enable_components = var.mc_enable_components
  }
}

Debug Output

β•·
β”‚ Error: Plugin did not respond
β”‚
β”‚   with module.gke.google_container_cluster.this,
β”‚   on modules\gcp-gke\main.tf line 18, in resource "google_container_cluster" "this":
β”‚   18: resource "google_container_cluster" "this" {
β”‚
β”‚ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange  
β”‚ call. The plugin logs may contain more details.
β•΅

Stack trace from the terraform-provider-google-beta_v4.11.0_x5.exe plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 43 [running]:
github.com/hashicorp/terraform-provider-google-beta/google-beta.expandAuthenticatorGroupsConfig(...)        
        github.com/hashicorp/terraform-provider-google-beta/google-beta/resource_container_cluster.go:3236  
github.com/hashicorp/terraform-provider-google-beta/google-beta.resourceContainerClusterCreate(0xc000d16980, 0x3703680, 0xc000c0d800, 0x0, 0x0)
        github.com/hashicorp/terraform-provider-google-beta/google-beta/resource_container_cluster.go:1535 +0x4f4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000964b60, 0x3c311b0, 0xc000e7c840, 0xc000d16980, 0x3703680, 0xc000c0d800, 0x0, 0x0, 0x0)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:329 +0x1f6
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000964b60, 0x3c311b0, 0xc000e7c840, 0xc000ff1e10, 0xc000d16f80, 0x3703680, 0xc000c0d800, 0x0, 0x0, 0x0, ...)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:467 +0x67b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000233920, 0x3c311b0, 0xc000e7c840, 0xc001097f40, 0x373f375, 0x12, 0x0)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:977 +0xacf      
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0000c4680, 0x3c31258, 0xc000e7c840, 0xc001078d90, 0x0, 0x0, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:603 +0x465
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x368d940, 0xc0000c4680, 0x3c31258, 0xc000ea5500, 0xc000543c80, 0x0, 0x3c31258, 0xc000ea5500, 0xc000fcfa80, 0x1a4e)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x222
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000216540, 0x3c6cf58, 0xc000297b00, 0xc000227440, 0xc000676a20, 0x4c02d00, 0x0, 0x0, 0x0)
        google.golang.org/[email protected]/server.go:1297 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000216540, 0x3c6cf58, 0xc000297b00, 0xc000227440, 0x0)     
        google.golang.org/[email protected]/server.go:1626 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000709b20, 0xc000216540, 0x3c6cf58, 0xc000297b00, 0xc000227440)
        google.golang.org/[email protected]/server.go:941 +0xb2
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:939 +0x1fd

Error: The terraform-provider-google-beta_v4.11.0_x5.exe plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Panic Output

Expected Behavior

Create a cluster with the configuration passed in

Actual Behavior

Plugin crashed

Steps to Reproduce

  1. terraform init
  2. terraform apply

Important Factoids

References

Looked this issue up but did not work

b/299312562

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions