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

Auth module crash with 4.49 google provider #1533

Closed
cliles opened this issue Jan 18, 2023 · 6 comments · Fixed by #1535 or #1541
Closed

Auth module crash with 4.49 google provider #1533

cliles opened this issue Jan 18, 2023 · 6 comments · Fixed by #1535 or #1541
Labels
bug Something isn't working

Comments

@cliles
Copy link

cliles commented Jan 18, 2023

TL;DR

When use_private_endpoint is set to true, auth module will fail to plan.

Expected behavior

use_private_endpoint to work.

Observed behavior

On a terraform plan:

module.target_repo.module.kubernetes-engine_auth.data.google_client_config.provider: Refreshing state...
module.target_repo.module.kubernetes-engine_auth.data.google_container_cluster.gke_cluster: Refreshing state...

Error: Invalid address to set: []string{"addons_config", "0", "config_connector_config"}

  on .terraform/modules/target_repo.kubernetes-engine_auth/modules/auth/main.tf line 26, in data "google_container_cluster" "gke_cluster":
  26: data "google_container_cluster" "gke_cluster" {

Terraform Configuration

module "kubernetes-engine_auth" {
  source  = "terraform-google-modules/kubernetes-engine/google//modules/auth"
  version = "24.1.0"

  cluster_name         = var.cluster_name
  location             = var.regionality
  project_id           = local.project_id
  use_private_endpoint = true
}

Terraform Version

https://github.com/hashicorp/terraform-provider-google/releases/tag/v4.49.0

Additional information

Looks like the GA provider just released a new datasource.

@cliles cliles added the bug Something isn't working label Jan 18, 2023
@syphernl
Copy link

This seems to be due to this change since config connector is now GA: hashicorp/terraform-provider-google#13380

@RomeroGaliza
Copy link

Same issue here!

@tunguyen9889
Copy link

tunguyen9889 commented Jan 18, 2023

Facing same issue, I have to lock the google provider to not use 4.49:

terraform {
  required_version = ">= 1.3"

  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 4.44, < 4.49.0"
    }
    google-beta = {
      source  = "hashicorp/google-beta"
      version = ">= 4.44, < 4.49.0"
    }
  }
}

apeabody added a commit that referenced this issue Jan 18, 2023
@apeabody
Copy link
Contributor

This appears to be the upstream issue: hashicorp/terraform-provider-google#13507

@tpokki
Copy link

tpokki commented Jan 24, 2023

Version 4.50 google provider is out last night, and it has the same issue. Would you open this issue, or create another one?

@cliles
Copy link
Author

cliles commented Jan 24, 2023

Upstream PR to watch -> GoogleCloudPlatform/magic-modules#7162

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
6 participants