Closed joby-kurian closed 1 year ago
I just faced the same error with the gke module. I think it's a new option available in the google provider in 4.49.0 https://github.com/hashicorp/terraform-provider-google/pull/13380
module "gke" {
source = "terraform-google-modules/kubernetes-engine/google"
version = "~> 24.1"
Terraform v1.3.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v4.49.0
+ provider registry.terraform.io/hashicorp/google-beta v4.49.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.17.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
I had to downgrade the google provider to 4.48.0
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~>4.48.0"
}
As you suggested, it is working after google provider downgrade. Thank you so much for the update.
Hello,
We are facing the same bug described above, when using google provider v4.50.0 and gke terraform module v23.1.0 :
Error: Invalid address to set: []string{"addons_config", "0", "config_connector_config"}
with module.oro-gke-private-cluster01.module.acm[0].module.registration.data.google_container_cluster.primary,
on .terraform/modules/oro-gke-private-cluster01.acm.registration/modules/local/terraform-google-modules/kubernetes-engine/google/v23.1.0/modules/fleet-membership/main.tf line 23, in data "google_container_cluster" "primary":
23: data "google_container_cluster" "primary" {
Error: Invalid address to set: []string{"addons_config", "0", "config_connector_config"}
with module.oro-gke-private-cluster01.module.asm[0].data.google_container_cluster.asm,
on .terraform/modules/oro-gke-private-cluster01.asm/modules/local/terraform-google-modules/kubernetes-engine/google/v23.1.0/modules/asm/main.tf line 28, in data "google_container_cluster" "asm":
28: data "google_container_cluster" "asm" {
The terraform code referenced is:
# Retrieve GKE cluster info
data "google_container_cluster" "primary" {
name = var.cluster_name
location = var.location
project = var.project_id
}
and
data "google_container_cluster" "asm" {
project = var.project_id
name = var.cluster_name
location = var.cluster_location
depends_on = [var.module_depends_on]
}
Thank you, Bogdan
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
TL;DR
I am using GKE and ASM module for my development since august 2022. I was able to deploy GKE and ASM using below repo "terraform-google-modules/kubernetes-engine/google//modules/asm" and version = "20.0.0". But today I am getting one strange error, even without any change from my end. I tried with old branch which run successfully, also giving this error.
Error: Invalid address to set: []string{"addons_config", "0", "config_connector_config"} │ │ with module.asm.module.asm.data.google_container_cluster.asm, │ on .terraform/modules/asm.asm/modules/asm/main.tf line 28, in data "google_container_cluster" "asm": │ 28: data "google_container_cluster" "asm" {
Expected behavior
The code should run without any error.
Observed behavior
But it's throwing "Error: Invalid address to set".
Error: Invalid address to set: []string{"addons_config", "0", "config_connector_config"} │ │ with module.asm.module.asm.data.google_container_cluster.asm, │ on .terraform/modules/asm.asm/modules/asm/main.tf line 28, in data "google_container_cluster" "asm": │ 28: data "google_container_cluster" "asm" {
Terraform Configuration
Terraform Version
Additional information
Since last week I was able to run the code without any issues, not sure what happened now.