terraform-google-modules / terraform-google-kubernetes-engine

Configures opinionated GKE clusters
https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google
Apache License 2.0
1.15k stars 1.17k forks source link

refactor: remove unnecessary lookup for safer_cluster nodepool ID #2160

Closed wyardley closed 3 weeks ago

wyardley commented 3 weeks ago

Resolve tflint error on an unecessary lookup() call in safer_cluster node pool IDs.

each.key should function properly here, since the name is the key for each of the maps in the map of maps, though each.value.name should work as well.

I could use format() instead of string interpolation instead if it's preferred.

BEGIN_COMMIT_OVERRIDE fix: remove unnecessary lookup for safer_cluster nodepool ID (#2160) END_COMMIT_OVERRIDE

apeabody commented 3 weeks ago

/gcbrun

wyardley commented 3 weeks ago

Tested planning this locally and seems like it should still work? What was the failure on this one?

apeabody commented 3 weeks ago

Tested planning this locally and seems like it should still work? What was the failure on this one?

Yeah, it's unrelated to the change, started seeing this in the CI tests today:

Step #43 - "apply simple-zonal-private-local":          Error:          Received unexpected error:
Step #43 - "apply simple-zonal-private-local":                          FatalError{Underlying: error while running command: exit status 1; 
Step #43 - "apply simple-zonal-private-local":                          Error: Error waiting to create Network: Error waiting for Creating Network: Quota 'NETWORKS' exceeded.  Limit: 5.0 globally.
Step #43 - "apply simple-zonal-private-local":                              metric name = compute.googleapis.com/networks
Step #43 - "apply simple-zonal-private-local":                              limit name = NETWORKS-per-project
Step #43 - "apply simple-zonal-private-local":                              limit = 5
Step #43 - "apply simple-zonal-private-local":                              dimensions = map[global:global]
Step #43 - "apply simple-zonal-private-local":                          
Step #43 - "apply simple-zonal-private-local":                          
Step #43 - "apply simple-zonal-private-local":                            with google_compute_network.main,
Step #43 - "apply simple-zonal-private-local":                            on network.tf line 24, in resource "google_compute_network" "main":
Step #43 - "apply simple-zonal-private-local":                            24: resource "google_compute_network" "main" {
Step #43 - "apply simple-zonal-private-local":                          }
Step #43 - "apply simple-zonal-private-local":          Test:           TestSimpleZonalPrivate

I'll re-run the tests tomorrow.

apeabody commented 3 weeks ago

/gcbrun

apeabody commented 3 weeks ago

/gcbrun

apeabody commented 3 weeks ago

/gcbrun

apeabody commented 3 weeks ago

/gcbrun